Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Releases: janl/node-jsonpointer

Version 5.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 13 Jul 12:48

Changelog

  • Fix incorrect typings for compile get/set methods (#58, thanks to @haakemon)
  • Fix null values throwing exception when traversing over while getting (#50, thanks to @reckter)
  • Fix tests for null and undefined assertions (a5706e8)

v5.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 12 Nov 18:49

5.0.0 (2021-10-31)

Bug Fixes

  • Fix prototype pollution (#51)

    • The original, non-mutated objects are now returned if any of the keys __proto__, constructor or prototype are used in a json pointer.
    // returns the unmodified input {}
    jsonpointer.set({}, '/foo/__proto__/boo', 'polluted')
    • When passing non-string arrays to a .set operation, an error is thrown:
    // throws `new Error('Invalid JSON pointer. Must be of type string or number.')`
    jsonpointer.set({}, [['__proto__'], ['__proto__'], 'boo'], 'polluted')

v4.1.0

Choose a tag to compare

@janl janl released this 03 Jul 10:35

4.1.0 (2020-07-03)

Bug Fixes

Features

Version 4.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 21 Dec 13:33
37c73ae

Whitelist production relevant files in package.json.
This decreases the npm package size a bit.
#26

Version 4.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 19 May 09:54
2d46030
  • null values now get set properly
  • deleting a property is now supported by using jsonpointer.set(obj, '/val', undefined)

BREAKING CHANGES

setting null values

When setting a null value, it now gets set as actual value.
Previously we've deleted the property.

var obj = {foo: 'bar'}
jsonpointer.set(obj, '/foo', null)
// results in obj = {foo: null}

empty values

When getting a non-existent value, we previously returned null.
We've now changed that to undefined.

var obj = {}
jsonpointer.get(obj, '/foo')
// returns `undefined`
// with earlier versions, we've returned `null`

Version 3.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 19 May 07:25
bc72857

Split getter & setter to improve readability and improve the performance

Version 3.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 29 Sep 23:33
  • Support /- getter and setter and nested properties #19
  • Add jsonpointer.compile(pointer) feature #20
  • Lint files, use JavaScript standard style #23
  • Drop node 0.6 and 0.8 support

Version 2.0.0

Choose a tag to compare

@marcbachmann marcbachmann released this 26 May 20:33
  • Remove unused console module #18
  • Throw Error instances instead of strings #12

1.1.0

Choose a tag to compare

@marcbachmann marcbachmann released this 18 May 20:47
Merge pull request #9 from hildjj/master

Return null when value not found

1.0.1

Choose a tag to compare

@marcbachmann marcbachmann released this 18 May 20:48
1.0.1
Morty Proxy This is a proxified and sanitized view of the page, visit original site.