Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Automattic/mongoose
/ _pathToPositionalSyntax
Function
_pathToPositionalSyntax
lib/schema.js:1525–1530 ·
view source on GitHub ↗
(path)
Source
from the content-addressed store, hash-verified
1523
*/
1524
1525
function
_pathToPositionalSyntax(path) {
1526
if
(!/\.\d+/.test(path)) {
1527
return
path;
1528
}
1529
return
path.replace(/\.\d+\./g,
'.$.'
).replace(/\.\d+$/,
'.$'
);
1530
}
1531
1532
/*!
1533
* ignore
Callers
1
schema.js
File · 0.85
Calls
1
test
Method · 0.80
Tested by
no test coverage detected