Skip to content

Commit

Permalink
🐛 docs: update require name, description
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfram77 committed Apr 10, 2023
1 parent f6d9cc8 commit 155d4f2
Show file tree
Hide file tree
Showing 7 changed files with 819 additions and 769 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
tags:
- '!*' # Do not execute on tags
env:
NAME: ${{vars.NAME}}
EMAIL: ${{vars.EMAIL}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
FORCE_COLOR: 1
Expand Down Expand Up @@ -55,8 +58,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.x
- run: git clone https://${GITHUB_TOKEN}@github.com/nodef/deploy "$HOME/deploy"
- run: bash "$HOME/deploy/setup.sh"
- uses: nodef/[email protected]
- run: npm i -g typescript typedoc
- run: npm ci
- run: npm run publish-docs
Expand All @@ -71,8 +73,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.x
- run: git clone https://${GITHUB_TOKEN}@github.com/nodef/deploy "$HOME/deploy"
- run: bash "$HOME/deploy/setup.sh"
- uses: nodef/[email protected]
with:
entries: access = public
- run: npm i -g typescript rollup typedoc browserify terser
- run: npm ci
- run: npm run publish-packages
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
Common operations for 32-bit integers.<br>
A [32-bit integer] can store values from `-2^31` to `2^31 - 1`.<br>
📦 [Node.js](https://www.npmjs.com/package/extra-integer),
🌐 [Web](https://www.npmjs.com/package/extra-integer.web),
📜 [Files](https://unpkg.com/extra-integer/),
📰 [Docs](https://nodef.github.io/extra-integer/),
📘 [Wiki](https://github.com/nodef/extra-integer/wiki/).

A [32-bit integer] can store values from −2^31 ([MIN_VALUE]) to 2^31 − 1
This package deals with the manipulation of **32-bit integers** in JavaScript,
which can store values ranging from `-2^31` ([MIN_VALUE]) to `2^31 - 1`
([MAX_VALUE]). JavaScript converts a `Number` (a *64-bit floating point number*)
to a *32-bit* *integer* (`int32`) when bitwise operators (such as `|`) are
applied. Use [is] to check is a number can be represented as a *32-bit integer*.
to a *32-bit integer* (`int32`) when bitwise operators (such as `|`) are
applied.

Use [is] to check is a number can be represented as a *32-bit integer*.
**Sign**-based operations include [abs] and [signEqual]. **Power/logarithm**
related operations include [isPow2], [prevPow2], [nextPow2], [pow2], [pow10],
[log2], and [log10].

This package is available in *Node.js* and *Web* formats. The web format
is exposed as `extra_integer` standalone variable and can be loaded from
[jsDelivr CDN].
This package is available in *Node.js* and *Web* formats. To use it on the web,
simply use the `extra_integer` global variable after loading with a `<script>`
tag from the [jsDelivr CDN].

> Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
Expand All @@ -25,17 +28,17 @@ is exposed as `extra_integer` standalone variable and can be loaded from
<br>

```javascript
const integer = require('extra-integer');
// import * as integer from "extra-integer";
// import * as integer from "https://unpkg.com/extra-integer/index.mjs"; (deno)
const xinteger = require('extra-integer');
// import * as xinteger from "extra-integer";
// import * as xinteger from "https://unpkg.com/extra-integer/index.mjs"; (deno)

integer.is(9.11e-31);
xinteger.is(9.11e-31);
// → false

integer.log10(10000);
xinteger.log10(10000);
// → 4

integer.nextPow2(63);
xinteger.nextPow2(63);
// → 64
```

Expand Down
Loading

0 comments on commit 155d4f2

Please sign in to comment.