Socket
Socket
Sign inDemoInstall

js-pointer

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    js-pointer

Tiny, spec compliant JSON Pointer RFC 6901 implementation.


Version published
Weekly downloads
39
decreased by-33.9%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

js-pointer

Build Status Coverage Status js-standard-style

Tiny, spec compliant implementation of the JSON Pointer spec RFC 6901 with 100% test coverage.

Getting started

Install via NPM

  npm i js-pointer --save
var jsPointer = require('js-pointer');

var object = { one: { two: { three: [{ four: 4 }] } } }
jsonPointer.get(object, '/one/two/three/0/four') // returns 4

Please see the spec and tests for further detail of the json pointer format.

API

jsPointer.get(object, pointer)

returns sub-object or value in object referred to by pointer

object

Plain object targeted by the pointer

pointer

string JSON pointer

Keywords

FAQs

Last updated on 28 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc