Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
azanul / server / node_modules / undefsafe / example.js
Size: Mime:
var undefsafe = require('undefsafe');

var object = {
  a: {
    b: {
      c: 1,
      d: [1, 2, 3],
      e: 'remy'
    }
  }
};

console.log(undefsafe(object, 'a.b.e')); // "remy"
console.log(undefsafe(object, 'a.b.not.found')); // undefined