New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

krl-stdlib

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-stdlib - npm Package Compare versions

Comparing version 0.50.0 to 0.51.0

4

package.json
{
"name": "krl-stdlib",
"version": "0.50.0",
"version": "0.51.0",
"description": "Standard library for KRL",

@@ -32,3 +32,3 @@ "main": "src/index.js",

},
"gitHead": "9e4f6287866ee86a927d7bfff22ae013618d00d8"
"gitHead": "001547a7318d663da87af086aab92fbfebf1fa7c"
}

@@ -892,2 +892,5 @@ var _ = require('lodash')

path = toKeyPath(path)
if (path.length === 0) {
return obj
}
return _.get(obj, path, null)

@@ -901,2 +904,5 @@ }

path = toKeyPath(path)
if (path.length === 0) {
return val
}
// TODO optimize

@@ -903,0 +909,0 @@ obj = _.cloneDeep(obj)

@@ -925,5 +925,11 @@ var _ = require('lodash')

tf('get', [obj, ['pi', 2]], 4)
tf('get', [obj, []], obj)
tf('get', [obj, null], null)
assertObjNotMutated()
tf('get', [['a', 'b', { 'c': ['d', 'e'] }], [2, 'c', 1]], 'e', 'get works on arrays and objects equally')
tf('get', [['a', 'b', { 'c': ['d', 'e'] }], ['2', 'c', '1']], 'e', 'array indices can be strings')
tf('get', [{ 'null': 3, 'undefined': 4 }, null], 3)
tf('get', [{ 'null': 3, 'undefined': 4 }, NaN], 3, 'using KRL toString you get "null"')
tf('get', [{ 'null': 3, 'undefined': 4 }, undefined], 3)
tf('get', [{ 'null': 3, 'undefined': 4 }, 'undefined'], 4)

@@ -965,2 +971,6 @@ tf('set', [obj, ['foo', 'baz'], 'qux'], {

})
tf('set', [obj, [], { a: 1, b: 2 }], { a: 1, b: 2 })
tf('set', [obj, null, { a: 1, b: 2 }], Object.assign({}, obj, {
'null': { a: 1, b: 2 }
}))
assertObjNotMutated()

@@ -967,0 +977,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc