1.0.4 • Published 7 years ago

getdeep v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

getdeep

like .get but goes all the way down

use

var getDeep = require('getdeep');

works on objects like normal

getDeep('en', {en: 'the title', fr: 'le titre'}); // 'the title'

get deeper

getDeep('en', {
    title: {
        en: 'The title',
        fr: 'Le title'
    },
    body: {
        en: 'The body',
        fr: 'le texte'
    }
}); // { title: 'The title', body: 'The body' }

get arrays

getDeep('en', [
    {
        en: 'item 1',
        fr: 'point 1'
    },
    {
        en: 'item 2',
        fr: 'point 2'
    }
]); // ['item 1','item 2']
1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago