Skip to content

Releases: devchris/jsdig

Security patch

22 Feb 19:49
d80ef7c

Choose a tag to compare

0.1.6

Merge pull request #10 from devchris/dependabot/npm_and_yarn/pathval-…

Returns object itself if no digest values are provided

30 Aug 09:25
e818ba7

Choose a tag to compare

const testObject = {
    other: {
      name: 'Christoph'
    }
 };

testObject.dig() === testObject;

Thank you @xtr3me 🎉

Adds a default return option

21 May 07:16

Choose a tag to compare

If it can't find the value, it will return null by default. However, you can now also pass in a default value of what should be returned if it isn't found.

const world = {
  locations: [{
    europe: 'Bamberg',
  }, {
    usa: 'Indianapolis'
  }]
};
world.dig('locations', 0, 'europe', 'germany', { default: [] });
// => []
world.dig('locations', 0, 'europe', 'germany', { default: 'not found' });
// => 'not found'
world.dig('locations', 0, 'europe', 'germany', { default: '' });
// => ''

Performance update and reduced build size

25 Apr 06:39

Choose a tag to compare

Performance update and reduced build size, also added more tests

0.1.2

16 Apr 17:43

Choose a tag to compare

bump package version

Jsdig

11 Apr 15:39

Choose a tag to compare

0.1.0

Updates readme

Bugfix

11 Apr 11:34
278e903

Choose a tag to compare

Bugfix Pre-release
Pre-release

This fixes an issue where it was possible to get undefined returned instead of null.

.dig as Object.prototype function

11 Apr 11:22

Choose a tag to compare

Pre-release

This will break all previous Versions!

Given the following object:

const obj = {
  number: 1 
}

use obj.dig('number') now instead of Dig(obj, 'number')

jsdig based on ruby's hash#dig

10 Apr 15:38

Choose a tag to compare

Pre-release
0.0.1

Creates jsdig based on ruby's hash#dig