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

@mapbox/expression-jamsession

Package Overview
Dependencies
Maintainers
205
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/expression-jamsession - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

4

CHANGELOG.md
# Changelog
## 0.3.2
- Fix handling of symbolic decision operators, like `<=` and `!`.
## 0.3.1

@@ -4,0 +8,0 @@

@@ -117,2 +117,6 @@ 'use strict';

// These operators are used between operands instead of like a function
// name in a call expression, so 3 + 4 instead of +(3, 4).
var symbolOperatorRegExp = /^(\+|\*|-|\/|%|!|!=|<|<=|==|>|>=)$/;
function stringifyLiteralArray(arr) {

@@ -162,3 +166,3 @@ var items = arr.map(function (item) {

if (operator === '+' || operator === '*' || operator === '-' || operator === '/' || operator === '%') {
if (symbolOperatorRegExp.test(operator)) {
return '' + args.join(' ' + operator + ' ');

@@ -165,0 +169,0 @@ }

2

package.json
{
"name": "@mapbox/expression-jamsession",
"version": "0.3.1",
"version": "0.3.2",
"description": "Write Mapbox GL expressions in a more familiar, handwritable, spreadsheet-like, programming-like syntax.",

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

@@ -11,4 +11,7 @@ # @mapbox/expression-jamsession

- Arithmetic operators (`+ - * /`) and parentheses work like in high school math, e.g. `((3 + 4) * 2) / 7`.
- Expressions are represented like function invocations in programming, e.g. `get("population")`, `log2(get("population"))`.
- Most expressions are represented like function invocations in programming, e.g. `get("population")`, `log2(get("population"))`.
- Symbolic math operators (`+ - * / %`) and parentheses work like in high school math, e.g. `((3 + 4) * 2) / 7`.
That is, the formula should contain `3 + 4` instead of `+(3, 4)`.
- Symbolic decision operators also work with operands on both sides, instead of like function invocations.
So `get("foo") != 4` instead of `!=(get("foo"), 4)`.
- `&` operator concatenates strings, as in spreadsheet programs.

@@ -15,0 +18,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