MCPcopy Index your code
hub / github.com/deployd/deployd / castPath

Function castPath

test-app/public/sinon.js:15086–15091  ·  view source on GitHub ↗

* Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array.

(value, object)

Source from the content-addressed store, hash-verified

15084 * @returns {Array} Returns the cast property path array.
15085 */
15086 function castPath(value, object) {
15087 if (isArray(value)) {
15088 return value;
15089 }
15090 return isKey(value, object) ? [value] : stringToPath(toString(value));
15091 }
15092
15093 /**
15094 * A `baseRest` alias which can be replaced with `identity` by module

Callers 8

baseGetFunction · 0.85
baseInvokeFunction · 0.85
basePickByFunction · 0.85
baseSetFunction · 0.85
baseUnsetFunction · 0.85
hasPathFunction · 0.85
sinon.jsFile · 0.85
resultFunction · 0.85

Calls 3

isKeyFunction · 0.85
isArrayFunction · 0.70
toStringFunction · 0.70

Tested by

no test coverage detected