File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,16 +29,32 @@ Usage
2929
3030The package exports an ECMAScript module with an UMD fallback.
3131
32+ ``` sh
33+ $> npm install long
34+ ```
35+
3236``` js
3337import Long from " long" ;
3438
35- var longVal = new Long (0xFFFFFFFF , 0x7FFFFFFF );
36-
37- console .log (longVal .toString ());
39+ var value = new Long (0xFFFFFFFF , 0x7FFFFFFF );
40+ console .log (value .toString ());
3841...
3942```
4043
41- Note that mixing ESM and CommonJS is not recommended as it yield different classes with the same functionality.
44+ Note that mixing ESM and CommonJS is not recommended as it yields different classes, albeit with the same functionality.
45+
46+ ### Usage with a CDN
47+
48+ * From GitHub via [ jsDelivr] ( https://www.jsdelivr.com ) :<br />
49+ ` https://cdn.jsdelivr.net/gh/dcodeIO/long.js@TAG/index.js ` (ESM)
50+ * From npm via [ jsDelivr] ( https://www.jsdelivr.com ) :<br />
51+ ` https://cdn.jsdelivr.net/npm/long@VERSION/index.js ` (ESM)
52+ ` https://cdn.jsdelivr.net/npm/long@VERSION/umd/index.js ` (UMD)
53+ * From npm via [ unpkg] ( https://unpkg.com ) :<br />
54+ ` https://unpkg.com/long@VERSION/index.js ` (ESM)
55+ ` https://unpkg.com/long@VERSION/umd/index.js ` (UMD)
56+
57+ Replace ` TAG ` respectively ` VERSION ` with a [ specific version] ( https://github.com/AssemblyScript/binaryen.js/releases ) or omit it (not recommended in production) to use main/latest.
4258
4359API
4460---
You can’t perform that action at this time.
0 commit comments