fixed typo
This commit is contained in:
parent
9d8b0e5c20
commit
40b3b55632
15
README.md
15
README.md
|
@ -31,13 +31,12 @@ Import your module as :
|
||||||
const bigintModArith = require('bigint-mod-arith')
|
const bigintModArith = require('bigint-mod-arith')
|
||||||
... // your code here
|
... // your code here
|
||||||
```
|
```
|
||||||
- JavaScript native or TypeScript project (including Angular and React)
|
- JavaScript native or TypeScript project (including React and Angular)
|
||||||
```javascript
|
```javascript
|
||||||
import * as bigintModArith from 'bigint-mod-arith'
|
import * as bigintModArith from 'bigint-mod-arith'
|
||||||
... // your code here
|
... // your code here
|
||||||
```
|
```
|
||||||
> BigInt is [ES-2020](https://tc39.es/ecma262/#sec-bigint-objects). In order to use it with TypeScript you should set `lib` (and probably also `target` and `module`) to `esnext` in `tsconfig.json`.
|
- JavaScript native browser ES module
|
||||||
- JavaScript native browser ES6 mod
|
|
||||||
```html
|
```html
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import * as bigintModArith from 'lib/index.browser.bundle.mod.js' // Use you actual path to the broser mod bundle
|
import * as bigintModArith from 'lib/index.browser.bundle.mod.js' // Use you actual path to the broser mod bundle
|
||||||
|
@ -46,13 +45,19 @@ Import your module as :
|
||||||
```
|
```
|
||||||
- JavaScript native browser IIFE
|
- JavaScript native browser IIFE
|
||||||
```html
|
```html
|
||||||
<script src="../../lib/index.browser.bundle.js"></script> <!-- Use you actual path to the browser bundle -->
|
<head>
|
||||||
|
...
|
||||||
|
<script src="../../lib/index.browser.bundle.iife.js"></script> <!-- Use you actual path to the browser bundle -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
...
|
||||||
<script>
|
<script>
|
||||||
... // your code here
|
... // your code here
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
```
|
```
|
||||||
|
|
||||||
And you could use it like in the following:
|
An example of usage could be:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
||||||
|
|
|
@ -30,13 +30,12 @@ Import your module as :
|
||||||
const {{PKG_CAMELCASE}} = require('{{PKG_NAME}}')
|
const {{PKG_CAMELCASE}} = require('{{PKG_NAME}}')
|
||||||
... // your code here
|
... // your code here
|
||||||
```
|
```
|
||||||
- JavaScript native or TypeScript project (including Angular and React)
|
- JavaScript native or TypeScript project (including React and Angular)
|
||||||
```javascript
|
```javascript
|
||||||
import * as {{PKG_CAMELCASE}} from '{{PKG_NAME}}'
|
import * as {{PKG_CAMELCASE}} from '{{PKG_NAME}}'
|
||||||
... // your code here
|
... // your code here
|
||||||
```
|
```
|
||||||
> BigInt is [ES-2020](https://tc39.es/ecma262/#sec-bigint-objects). In order to use it with TypeScript you should set `lib` (and probably also `target` and `module`) to `esnext` in `tsconfig.json`.
|
- JavaScript native browser ES module
|
||||||
- JavaScript native browser ES6 mod
|
|
||||||
```html
|
```html
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import * as {{PKG_CAMELCASE}} from 'lib/index.browser.bundle.mod.js' // Use you actual path to the broser mod bundle
|
import * as {{PKG_CAMELCASE}} from 'lib/index.browser.bundle.mod.js' // Use you actual path to the broser mod bundle
|
||||||
|
@ -45,13 +44,19 @@ Import your module as :
|
||||||
```
|
```
|
||||||
- JavaScript native browser IIFE
|
- JavaScript native browser IIFE
|
||||||
```html
|
```html
|
||||||
<script src="../../lib/index.browser.bundle.js"></script> <!-- Use you actual path to the browser bundle -->
|
<head>
|
||||||
|
...
|
||||||
|
<script src="../../lib/index.browser.bundle.iife.js"></script> <!-- Use you actual path to the browser bundle -->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
...
|
||||||
<script>
|
<script>
|
||||||
... // your code here
|
... // your code here
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
```
|
```
|
||||||
|
|
||||||
And you could use it like in the following:
|
An example of usage could be:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
/* Stage 3 BigInts with value 666 can be declared as BigInt('666')
|
||||||
|
|
Loading…
Reference in New Issue