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

expressions-js

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expressions-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

7

package.json
{
"name": "expressions-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "Converts simplified JavaScript expressions into executable functions for JavaScript frameworks.",

@@ -24,6 +24,3 @@ "keywords": [

},
"licenses": {
"type": "MIT",
"url": "git://github.com/chip-js/expressions-js/LICENSE"
},
"license": "MIT",
"scripts": {

@@ -30,0 +27,0 @@ "test": "mocha test"

@@ -11,2 +11,8 @@ # Expressions.js

To install Expressions.js you can use npm.
```
npm install expressions-js
```
`parse(expr)` will return a function that can be executed against any context and will return the results.

@@ -13,0 +19,0 @@

@@ -28,3 +28,3 @@ var referenceCount = 0;

// matches property chains (e.g. `name`, `user.name`, and `user.fullName().capitalize()`)
var propertyRegex = /((\{|,|\.)?\s*)([a-z$_\$](?:[a-z_\$0-9\.-]|\[['"\d]+\])*)(\s*(:|\(|\[)?)|(\[)/gi;
var propertyRegex = /((\{|,|\.)?\s*)([a-z$_\$](?:[a-z_\$0-9\.-]|\[['"\d]+\])*)(\s*(:|\(|\[)?)/gi;
/**

@@ -31,0 +31,0 @@ * Broken down

@@ -143,2 +143,10 @@ var expect = require('chai').expect;

it('should deal with array literals', function() {
expect(parse('[foo, bar]')).to.equal('[this.foo, this.bar]');
});
it('should deal with object literals', function() {
expect(parse('{foo: foo, bar: bar }')).to.equal('{foo: this.foo, bar: this.bar }');
});
it('should work with simple setters', function() {

@@ -145,0 +153,0 @@ expect(parse('foo = _value_')).to.equal('this.foo = _value_');

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