MCPcopy Create free account
hub / github.com/Automattic/mongoose / _pathToPositionalSyntax

Function _pathToPositionalSyntax

lib/schema.js:1534–1539  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1532 */
1533
1534function _pathToPositionalSyntax(path) {
1535 if (!/\.\d+/.test(path)) {
1536 return path;
1537 }
1538 return path.replace(/\.\d+\./g, '.$.').replace(/\.\d+$/, '.$');
1539}
1540
1541/*!
1542 * ignore

Callers 1

schema.jsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected