amis-formula 3.1.0 → 3.2.0
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/esm/doc.js +99 -99
- package/esm/doc.md +149 -147
- package/esm/error.js +1 -1
- package/esm/evalutor.d.ts +158 -147
- package/esm/evalutor.js +159 -148
- package/esm/evalutorForAsync.js +1 -1
- package/esm/filter.js +1 -1
- package/esm/function.js +1 -1
- package/esm/index.js +1 -1
- package/esm/lexer.js +2 -2
- package/esm/parser.js +1 -1
- package/lib/doc.js +99 -99
- package/lib/doc.md +149 -147
- package/lib/error.js +1 -1
- package/lib/evalutor.d.ts +158 -147
- package/lib/evalutor.js +159 -148
- package/lib/evalutorForAsync.js +1 -1
- package/lib/filter.js +1 -1
- package/lib/function.js +1 -1
- package/lib/index.js +1 -1
- package/lib/lexer.js +2 -2
- package/lib/parser.js +1 -1
- package/package.json +7 -2
package/lib/evalutorForAsync.js
CHANGED
package/lib/filter.js
CHANGED
package/lib/function.js
CHANGED
package/lib/index.js
CHANGED
package/lib/lexer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* amis-formula v3.
|
|
2
|
+
* amis-formula v3.2.0
|
|
3
3
|
* Copyright 2021-2023 fex
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -659,7 +659,7 @@ function lexer(input, options) {
|
|
|
659
659
|
// 所以纯变量模式支持纯数字作为变量名
|
|
660
660
|
var reg = (options === null || options === void 0 ? void 0 : options.variableMode)
|
|
661
661
|
? /^[\u4e00-\u9fa5A-Za-z0-9_$@][\u4e00-\u9fa5A-Za-z0-9_\-$@]*/
|
|
662
|
-
: /^(?:[\u4e00-\u9fa5A-Za-z_$@]([\u4e00-\u9fa5A-Za-z0-9_
|
|
662
|
+
: /^(?:[\u4e00-\u9fa5A-Za-z_$@]([\u4e00-\u9fa5A-Za-z0-9_$@]|\\(?:\.|\[|\]|\(|\)|\{|\}|\s|=|!|>|<|\||&|\+|-|\*|\/|\^|~|%|&|\?|:|;|,))*|\d+[\u4e00-\u9fa5A-Za-z_$@](?:[\u4e00-\u9fa5A-Za-z0-9_$@]|\\(?:\.|\[|\]|\(|\)|\{|\}|\s|=|!|>|<|\||&|\+|-|\*|\/|\^|~|%|&|\?|:|;|,))*)/;
|
|
663
663
|
var match = reg.exec(input.substring(index, index + 256) // 变量长度不能超过 256
|
|
664
664
|
);
|
|
665
665
|
if (match) {
|
package/lib/parser.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amis-formula",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "负责 amis 里面的表达式实现,内置公式,编辑器等",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
"browserslist": "IE >= 11",
|
|
82
82
|
"jest": {
|
|
83
83
|
"testEnvironment": "jsdom",
|
|
84
|
+
"collectCoverage": true,
|
|
85
|
+
"coverageReporters": [
|
|
86
|
+
"text",
|
|
87
|
+
"cobertura"
|
|
88
|
+
],
|
|
84
89
|
"collectCoverageFrom": [
|
|
85
90
|
"src/**/*"
|
|
86
91
|
],
|
|
@@ -113,5 +118,5 @@
|
|
|
113
118
|
"printBasicPrototype": false
|
|
114
119
|
}
|
|
115
120
|
},
|
|
116
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "910dddafdbcaf3b11012ade7c593c24b285dfeb5"
|
|
117
122
|
}
|