subscript 8.1.0 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # sub<em>script</em> <a href="https://github.com/spectjs/subscript/actions/workflows/node.js.yml"><img src="https://github.com/spectjs/subscript/actions/workflows/node.js.yml/badge.svg"/></a> <a href="https://bundlephobia.com/package/subscript"><img alt="npm bundle size" src="https://img.shields.io/bundlephobia/minzip/subscript/latest?color=brightgreen&label=gzip"/></a> <a href="http://npmjs.org/subscript"><img src="https://img.shields.io/npm/v/subscript"/></a> <a href="http://microjs.com/#subscript"><img src="https://img.shields.io/badge/microjs-subscript-blue?color=darkslateblue"/></a>
2
2
 
3
- > _Subscript_ is fast, tiny & extensible expression evaluator / microlanguage.
3
+ > _Subscript_ is fast, tiny & extensible expression evaluator / microlanguage with standard syntax.
4
4
 
5
5
  #### Used for:
6
6
 
@@ -110,7 +110,7 @@ a; // variable (from scope)
110
110
 
111
111
  ## Extending
112
112
 
113
- _Subscript_ provides pluggable language [features](./features) and API to customize syntax:
113
+ _Subscript_ provides premade language [features](./features) and API to customize syntax:
114
114
 
115
115
  * `unary(str, precedence, postfix=false)` − register unary operator, either prefix `⚬a` or postfix `a⚬`.
116
116
  * `binary(str, precedence, rassoc=false)` − register binary operator `a ⚬ b`, optionally right-associative.
package/feature/arrow.js CHANGED
@@ -3,7 +3,7 @@ import { compile, operator } from "../src/compile.js"
3
3
  import { PREC_ASSIGN, PREC_TOKEN } from "../src/const.js"
4
4
 
5
5
  // arrow functions (useful for array methods)
6
- binary('=>', PREC_ASSIGN)
6
+ binary('=>', PREC_ASSIGN, true)
7
7
  operator('=>',
8
8
  (a, b) => (
9
9
  a = a[0] === '()' ? a[1] : a,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subscript",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "description": "Fast and tiny expression evaluator with minimal syntax.",
5
5
  "main": "subscript.js",
6
6
  "module": "subscript.js",