This package has been deprecated

Author message:

Please, use 'q_' package instead.

safe-object-navigation

0.1.3 • Public • Published

/!\ Please, use 'q_' package instead.

Safe navigation into objects

const q = require('q_');

const object = {
  a: {
    b: {
      c: {
        d: 1,
        array: ['foo', 'bar'],
      },
    },
  },
};

q(object, 'a.b.c.d'); // => 1
q(object, 'a.b.c.array[1]'); // => bar

Package Sidebar

Install

npm i safe-object-navigation

Weekly Downloads

3

Version

0.1.3

License

ISC

Last publish

Collaborators

  • antonio.presto