dotty
dotty copied to clipboard
'undefined is not a function' @ lib/index.js:225
I keep getting the following error when trying to run these two lines from the example code:
console.log(dotty.deepKeys(object, {leavesOnly: true}));
console.log(dotty.deepKeys(object, {leavesOnly: true, asStrings: true}));
I don't think this repository is actively being maintained anymore?
I have an error in the same place, but it says "prefix.concat is not a function". I installed from npm and copied the tests and ran them. Here is the output
true
true
false
false
y
y
undefined
undefined
[ 'y', 'hi' ]
[ 'y', 'hi' ]
[ 'y', 'z' ]
[ 'y', 'z' ]
[ 'hi', 'sup' ]
true
false
[ [ 'a' ],
[ 'a', 'b' ],
[ 'a', 'b', 'hello' ],
[ 'a', 'c' ],
[ 'a', 'c', 'x' ],
[ 'a', 'c', 'yo' ] ]
..../node_modules/dotty/lib/index.js:225
keys.push(prefix.concat([k]));
^
TypeError: prefix.concat is not a function