JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44
  • Score
    100M100P100Q60999F
  • License MIT

Tiny, spec compliant JSON Pointer RFC 6901 implementation.

Package Exports

  • js-pointer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-pointer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

js-pointer

Build Status Coverage Status js-standard-style Dependencies npm version

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

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