deoxxa / dotty

Access properties of nested objects using dot-path notation
BSD 3-Clause "New" or "Revised" License
128 stars 20 forks source link

'undefined is not a function' @ lib/index.js:225 #17

Open Cyberuben opened 9 years ago

Cyberuben commented 9 years ago

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?

serkanserttop commented 8 years ago

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