Skip to content

Getting started

Arthur Guiot edited this page Aug 2, 2018 · 4 revisions

Installation

Node (recommended)

Type the following command in a terminal

[sudo] npm i theorem.js

Then open your favorite code editor:

const t = require("theorem.js");
/* Start coding here */

Browser

At the end of your <body> tag:

<!-- BigNumber -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/7.2.1/bignumber.min.js" charset="utf-8"></script>
<!-- TheoremJS -->
<script src="https://unpkg.com/theorem.js" charset="utf-8"></script>
<!-- Your scripts -->

In your script:

const t = new TheoremJS()

Configuration

Access to the BigNumber configuration like that:

t.config(OBJ) // => BigNumber.config(OBJ)
Clone this wiki locally