Gathering detailed insights and metrics for @jspreadsheet/formulajs
Gathering detailed insights and metrics for @jspreadsheet/formulajs
Gathering detailed insights and metrics for @jspreadsheet/formulajs
Gathering detailed insights and metrics for @jspreadsheet/formulajs
npm install @jspreadsheet/formulajs
Typescript
Module System
Node Version
NPM Version
78.8
Supply Chain
99.2
Quality
74.8
Maintenance
100
Vulnerability
100
License
Total Downloads
137
Last Day
1
Last Week
5
Last Month
16
Last Year
107
Minified
Minified + Gzipped
Latest Version
1.0.1
Package Id
@jspreadsheet/formulajs@1.0.1
Unpacked Size
2.61 MB
Size
486.26 kB
File Count
61
NPM Version
6.14.18
Node Version
14.21.3
Published on
May 21, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
66.7%
5
Compared to previous week
Last Month
166.7%
16
Compared to previous month
Last Year
256.7%
107
Compared to previous year
Official website and documentation is here
Powered by jsDelivr, you can use the latest version of Formula.js:
1<script src="https://cdn.jsdelivr.net/npm/@formulajs/formulajs/lib/browser/formula.min.js"></script>
Then the functions can be accessed as
1formulajs.DATE(2008, 7, 8) 2formulajs.SUM([1, 2, 3]) 3...
Install the package:
npm i @formulajs/formulajs
1import * as formulajs from '@formulajs/formulajs' // import entire package 2 3formulajs.SUM([1, 2, 3]) // 6
1import { SUM } from '@formulajs/formulajs' // import individual components 2 3SUM([1, 2, 3]) // 6
1const formulajs = require('@formulajs/formulajs') // require entire package 2 3formulajs.SUM([1, 2, 3]) // 6
1const { SUM } = require('@formulajs/formulajs') // require individual components 2 3SUM([1, 2, 3]) // 6
When Formula.js is installed globally using npm, it can be used from the command line. To install Formula.js globally:
npm i -g @formulajs/formulajs
After installation, Formula.js is available via the command line:
1$ formulajs 2> SUM(1,2,3) 36
The functions DATE, DATEVALUE, EDATE, EOMONT, NOW, TODAY
return plain JS Date instead of the serial Excel number.
Copying composite formula directly from Excel into JS will not work out of the box:
= DATE(2020,5,9) - DATE(2020,5,8) // Formula.js: 86400000 / Excel: 1
It is not recommended to use DATEVALUE
to parse string representing a date. Formula.js uses new Date('YOUR STRING')
under the hood. There are better libraries to do this job (for example Moment.js)
If you were previously using formulajs from Sutoiku, some functions have been removed, due to dependency simplification.
Text functions:
FIXED, TEXT, DOLLAR, VALUE
Math functions:
MDETERM, MINVERSE, MMULT, MUNIT
Otherwise the 2 packages are fully compatible. You can swap them.
The code of this package is originally forked from @handsontable/formulajs version 2.0.2 (released in January 2020). The two packages were identical at the time. There is no regression, only fixes and new functions since the fork.
This project is forked from handsontable/formula.js and it's developed for everyone needs.
Original Formula.js project was developed and maintained by Ismael Chang Ghalimi, with support from STOIC and help from the following contributors: Ilmari Karonen, Sébastien Loisel, Trevor Norris, Roönaän, Hannes Stiebitzhofer.
It was then forked and extended by the handsontable/formula.js mainly contributed by @budnix.
The road map in the coming month is to gather the improvements made in the main forks of the original project. If you forked and made changes to sutoiku/formula.js do not hesitate to propose a pull request with your changes.
To avoid any regression or miss calculation please provide unit tests as long as function improvements.
No vulnerabilities found.
No security vulnerabilities found.