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

Function _pathToPositionalSyntax

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

Source from the content-addressed store, hash-verified

1522 */
1523
1524function _pathToPositionalSyntax(path) {
1525 if (!/\.\d+/.test(path)) {
1526 return path;
1527 }
1528 return path.replace(/\.\d+\./g, '.$.').replace(/\.\d+$/, '.$');
1529}
1530
1531/*!
1532 * ignore

Callers 1

schema.jsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected