npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@startinfinity/formulajs

v2.10.0

Published

JavaScript implementation of most Microsoft Excel formula functions

Downloads

3

Readme

Formula.js Build Status

Official website and documentation is here

Use it

In browser

Powered by jsDelivr, you can use the latest version of Formula.js:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jstat.min.js"></script> 
<script src="https://cdn.jsdelivr.net/gh/formulajs/[email protected]/dist/formula.min.js"></script>

Then the functions can be accessed as

formulajs.Date(2008, 7, 8)
formulajs.SUM([1, 2 , 3])
...

In node

Install the package:

npm i @formulajs/formulajs

Differences between Excel functions and Formula.js

Date

The functions DATE, DATEVALUE, EDATE, EOMONT, NOW, TODAYreturn 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)

Migration guide

From Formula.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.

From @handsontable/formulajs

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.

Historic

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.

Contributions and road map 2020

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.