@tktb-tess/util-fns 0.10.1 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,47 +1 @@
1
1
  # util-fns
2
-
3
- Utility functions for personal use
4
-
5
- Available in both a browser and Node.js environment.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm i @tktb-tess/util-fns
11
- ```
12
-
13
- ### Usage
14
-
15
- ```ts
16
- import { modPow, bailliePSW } from '@tktb-tess/util-fns';
17
-
18
- const ans = modPow(2n, 16n, 17n);
19
- console.log(ans); // 1n
20
-
21
- // Baillie-PSW primality test
22
- console.log(bailliePSW(2n)); // true
23
- console.log(bailliePSW(4n)): // false
24
-
25
- ```
26
-
27
- ### CDN
28
-
29
- You can also use it via CDN such as jsDelivr.
30
-
31
- ```html
32
- <!-- You can import it as a global variable -->
33
- <script src="https://cdn.jsdelivr.net/npm/@tktb-tess/util-fns@0.10.0/dist/bundle.min.js"></script>
34
- <script type="module">
35
- const { modPow } = UtilFns;
36
- // ...
37
- </script>
38
-
39
- <!-- or as an ES Module -->
40
- <script type="module">
41
- import { modPow } from 'https://cdn.jsdelivr.net/npm/@tktb-tess/util-fns@0.10.0/+esm';
42
- // ...
43
- </script>
44
- ```
45
-
46
-
47
-