Formule
JavaScript implementation of formulas for humans.
Contents
Installing
Using Yarn
yarn add formule
Using NPM
npm install formule
Using UMD
<script src="https://unpkg.com/formule/dist/formule.umd.js"></script>
API
Constants
e
The base of the natural logarithm.
Types
number
Syntax
e
Examples
e // 2.718281828459045
pi
The ratio of a circle's circumference to its diameter.
Types
number
Syntax
pi
Examples
pi // 3.141592653589793
Functions
concat
Concatenates its arguments and returns the result.
Types
Input: any
Output: string
Syntax
Examples
// HelloWorld
join
Inserts the first argument between the rest and returns their concatenation.
Types
Input: any
Output: string
Syntax
Examples
// 1-2-3
now
Returns the current date and time.
Types
string
Syntax
Examples
// Nov 6, 1999
toNumber
Parses a number from string, boolean or date.
Types
Input: string
boolean
number
Date
Output: number
Syntax
Examples
// 0
License
MIT
elaurent.org · GitHub emersonlaurentino · Twitter @elaurent_