@stackmeister/json-pointer
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

@stackmeister/json-pointer

Utilities for JSON-pointers.

Install

// Yarn
yarn add @stackmeister/json-pointer

// NPM
npm i @stackmeister/json-pointer

TypeScript typings are included (No @types/ package needed)

Usage

import { get, set, remove } from '@stackmeister/json-pointer'

get('/someProperty/2', { someProperty: ['a', 'b', 'c', 'd'] }) // "c"

set('/a/b', { a: { b: 2 } }, 5) // { a: { b: 5 } }

remove('/a/b', { a: { b: 2, c: 3 } }) // { a: { c: 3 } }

Readme

Keywords

none

Package Sidebar

Install

npm i @stackmeister/json-pointer

Weekly Downloads

2

Version

0.1.6

License

MIT

Unpacked Size

25.1 kB

Total Files

7

Last publish

Collaborators

  • torbenkoehn