@fileverse-dev/formula-parser 0.2.21 → 0.3.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/es/error.js CHANGED
@@ -10,7 +10,7 @@ export var ERROR_NULL = "NULL";
10
10
  export var ERROR_NUM = "NUM";
11
11
  export var ERROR_REF = "REF";
12
12
  export var ERROR_VALUE = "VALUE";
13
- var errors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ERROR, "Syntax error"), ERROR_DIV_ZERO, "#DIV/0!"), ERROR_NAME, "Wrong function name or parameter"), ERROR_NOT_AVAILABLE, "#N/A"), ERROR_NULL, "#NULL!"), ERROR_NUM, "#NUM!"), ERROR_REF, "#REF!"), ERROR_VALUE, "#VALUE!");
13
+ var errors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ERROR, "#ERROR!"), ERROR_DIV_ZERO, "#DIV/0!"), ERROR_NAME, "#NAME?"), ERROR_NOT_AVAILABLE, "#N/A"), ERROR_NULL, "#NULL!"), ERROR_NUM, "#NUM!"), ERROR_REF, "#REF!"), ERROR_VALUE, "#VALUE!");
14
14
 
15
15
  /**
16
16
  * Return error type based on provided error id.
package/es/parser.js CHANGED
@@ -24,9 +24,6 @@ import { trimEdges } from "./helper/string";
24
24
  import { toNumber, invertNumber } from "./helper/number";
25
25
  import errorParser, { isValidStrict as isErrorValid, ERROR, ERROR_NAME, ERROR_VALUE } from "./error";
26
26
  import { extractLabel, toLabel } from "./helper/cell";
27
- function normalizeQuotes(text) {
28
- return text.replace(/[\u201C\u201D]/g, '"').replace(/[\u2018\u2019]/g, "'");
29
- }
30
27
 
31
28
  /**
32
29
  * @class Parser
@@ -77,7 +74,6 @@ var Parser = /*#__PURE__*/function (_Emitter) {
77
74
  return _createClass(Parser, [{
78
75
  key: "parse",
79
76
  value: function parse(expression, options) {
80
- expression = normalizeQuotes(expression);
81
77
  var result = null;
82
78
  var error = null;
83
79
  this.options = options;
package/lib/error.js CHANGED
@@ -18,7 +18,7 @@ var ERROR_NULL = exports.ERROR_NULL = "NULL";
18
18
  var ERROR_NUM = exports.ERROR_NUM = "NUM";
19
19
  var ERROR_REF = exports.ERROR_REF = "REF";
20
20
  var ERROR_VALUE = exports.ERROR_VALUE = "VALUE";
21
- var errors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ERROR, "Syntax error"), ERROR_DIV_ZERO, "#DIV/0!"), ERROR_NAME, "Wrong function name or parameter"), ERROR_NOT_AVAILABLE, "#N/A"), ERROR_NULL, "#NULL!"), ERROR_NUM, "#NUM!"), ERROR_REF, "#REF!"), ERROR_VALUE, "#VALUE!");
21
+ var errors = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ERROR, "#ERROR!"), ERROR_DIV_ZERO, "#DIV/0!"), ERROR_NAME, "#NAME?"), ERROR_NOT_AVAILABLE, "#N/A"), ERROR_NULL, "#NULL!"), ERROR_NUM, "#NUM!"), ERROR_REF, "#REF!"), ERROR_VALUE, "#VALUE!");
22
22
 
23
23
  /**
24
24
  * Return error type based on provided error id.
package/lib/parser.js CHANGED
@@ -32,10 +32,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
32
32
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
33
33
  function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
34
34
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
35
- function normalizeQuotes(text) {
36
- return text.replace(/[\u201C\u201D]/g, '"').replace(/[\u2018\u2019]/g, "'");
37
- }
38
-
39
35
  /**
40
36
  * @class Parser
41
37
  */
@@ -85,7 +81,6 @@ var Parser = /*#__PURE__*/function (_Emitter) {
85
81
  return _createClass(Parser, [{
86
82
  key: "parse",
87
83
  value: function parse(expression, options) {
88
- expression = normalizeQuotes(expression);
89
84
  var result = null;
90
85
  var error = null;
91
86
  this.options = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formula-parser",
3
- "version": "0.2.21",
3
+ "version": "0.3.0",
4
4
  "description": "Formula parser",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -48,7 +48,7 @@
48
48
  "webpack-cli": "^4.2.0"
49
49
  },
50
50
  "dependencies": {
51
- "@fileverse-dev/formulajs": "4.4.11-mod-67",
51
+ "@fileverse-dev/formulajs": "4.4.11-mod-62",
52
52
  "tiny-emitter": "^2.1.0"
53
53
  },
54
54
  "jest": {