Comparing version 1.2.1 to 1.3.0
{ | ||
"name": "fparser", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "A Math Formula parser library for JavaScript", | ||
"main": "fparser.js", | ||
"main": "dist/fparser.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"docker-shell": "docker run --rm -ti -v \"$PWD\":/usr/src/app -w /usr/src/app node:6 bash", | ||
"build": "babel src -d dist", | ||
"test": "npm run build && jasmine && karma start" | ||
}, | ||
@@ -28,3 +30,72 @@ "keywords": [ | ||
}, | ||
"homepage": "https://github.com/bylexus/fparse" | ||
"homepage": "https://github.com/bylexus/fparse", | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"eslint": "^5.0.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint-plugin-prettier": "^2.6.1", | ||
"jasmine": "^3.1.0", | ||
"jasmine-core": "^3.1.0", | ||
"karma": "^2.0.4", | ||
"karma-jasmine": "^1.1.2", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"prettier": "^1.13.5" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": "prettier", | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"plugins": [ | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"printWidth": 120 | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"vars": "all", | ||
"args": "none" | ||
} | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"curly": "error", | ||
"eqeqeq": "error", | ||
"no-eval": "error", | ||
"no-loop-func": "error", | ||
"radix": "error", | ||
"comma-dangle": "error", | ||
"no-undef": "error" | ||
}, | ||
"globals": { | ||
"describe": false, | ||
"it": false, | ||
"beforeEach": false, | ||
"expect": false | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 120, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} | ||
} |
@@ -23,3 +23,3 @@ fparse | ||
* the use of *variables* | ||
* use it in Web pages and as Node module | ||
* use it in Web pages, as ES6 module or as NodeJS module | ||
* Example:<br /> <code>-1*(sin(2^x)/(PI*x))*cos(x))</code> | ||
@@ -33,3 +33,3 @@ | ||
<!-- Within a web page: Load the fparse library: --> | ||
<script src="fparser.js"></script> | ||
<script src="dist/fparser.js"></script> | ||
``` | ||
@@ -39,3 +39,10 @@ | ||
// As node module: | ||
Install: | ||
$ npm install --save fparser | ||
Use: | ||
var Formula = require('./fparser'); | ||
or: | ||
import Formula from 'fparser'; | ||
``` | ||
@@ -86,3 +93,3 @@ | ||
var result = fObj.evaluate({ | ||
x: 2/Math.PI, | ||
x: 2/Math.PI, | ||
inverse: function(value){ | ||
@@ -101,1 +108,10 @@ return -1*value; | ||
console.log(f4.getVariables()); // ['x','y','a','z'] | ||
Changelog | ||
----------- | ||
# 1.3.0 | ||
* modernized library: The source is now ES6 code, and transpiled in a dist ES5+ library. | ||
* Make sure you include dist/fparser.js if you are using it as a browser library. | ||
* Drop support for Bower, as there are more modern approaches (npm) for package dependency nowadays | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
47472
912
0
113
11
1