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

Function _pathToPositionalSyntax

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

Source from the content-addressed store, hash-verified

1540 */
1541
1542function _pathToPositionalSyntax(path) {
1543 if (!/\.\d+/.test(path)) {
1544 return path;
1545 }
1546 return path.replace(/\.\d+\./g, '.$.').replace(/\.\d+$/, '.$');
1547}
1548
1549/*!
1550 * ignore

Callers 1

schema.jsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected