Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

property-expr

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

property-expr - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

index.js

@@ -21,3 +21,3 @@ /**

setter: function(path){
return setCache[path] || ( setCache[path] = new Function('data, value', expr(path, 'data') + ' = value'))
return setCache[path] || ( setCache[path] = new Function('data, value', 'return ' + expr(path, 'data') + ' = value, data;'))
},

@@ -27,3 +27,3 @@

var k = path + '_' + safe
return getCache[k] || ( getCache[k] = new Function('data', "return " + expr(path, safe, 'data') ))
return getCache[k] || ( getCache[k] = new Function('data', 'return ' + expr(path, safe, 'data') ))
},

@@ -30,0 +30,0 @@

{
"name": "property-expr",
"version": "1.3.0",
"version": "1.3.1",
"description": "tiny util for getting and setting deep object props safely",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -33,3 +33,5 @@ var a = require('assert')

setter('foo.bar[1]')(obj, 'bot')
a.strictEqual(
setter('foo.bar[1]')(obj, 'bot'), obj, 'setter must return the object')
a.strictEqual(obj.foo.bar[1], 'bot')

@@ -36,0 +38,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