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

Function _pathToPositionalSyntax

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

Source from the content-addressed store, hash-verified

1545 */
1546
1547function _pathToPositionalSyntax(path) {
1548 if (!/\.\d+/.test(path)) {
1549 return path;
1550 }
1551 return path.replace(/\.\d+\./g, '.$.').replace(/\.\d+$/, '.$');
1552}
1553
1554/*!
1555 * ignore

Callers 1

schema.jsFile · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected