MCPcopy
hub / github.com/adaltas/node-csv / castPath

Function castPath

packages/csv-stringify/lib/utils/get.js:76–82  ·  view source on GitHub ↗
(value, object)

Source from the content-addressed store, hash-verified

74};
75
76const castPath = function (value, object) {
77 if (Array.isArray(value)) {
78 return value;
79 } else {
80 return isKey(value, object) ? [value] : stringToPath(value);
81 }
82};
83
84const toKey = function (value) {
85 if (typeof value === "string" || isSymbol(value)) return value;

Callers 1

getFunction · 0.85

Calls 2

isKeyFunction · 0.85
stringToPathFunction · 0.85

Tested by

no test coverage detected