diff --git a/README.md b/README.md index aff6a03..408fdd6 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,18 @@ Import your module as : - Node.js ```javascript - const bigintCryptoUtils = require('bigint-mod-arith') + const bigintModArith = require('bigint-mod-arith') ... // your code here ``` - JavaScript native project ```javascript - import * as bigintCryptoUtils from 'bigint-mod-arith' + import * as bigintModArith from 'bigint-mod-arith' ... // your code here ``` - - Javascript native browser ES6 mod + - JavaScript native browser ES6 mod ```html import as bcu from 'bigint-mod-arith' @@ -50,7 +50,7 @@ Import your module as : - TypeScript ```typescript - import * as bigintCryptoUtils from 'bigint-mod-arith' + import * as bigintModArith from 'bigint-mod-arith' ... // 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`. @@ -66,11 +66,11 @@ const a = BigInt('5') const b = BigInt('2') const n = BigInt('19') -console.log(bigintCryptoUtils.modPow(a, b, n)) // prints 6 +console.log(bigintModArith.modPow(a, b, n)) // prints 6 -console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))) // prints 3 +console.log(bigintModArith.modInv(BigInt('2'), BigInt('5'))) // prints 3 -console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))) // prints 2 +console.log(bigintModArith.modInv(BigInt('3'), BigInt('5'))) // prints 2 ``` diff --git a/src/doc/readme-template.md b/src/doc/readme-template.md index 356c732..3eee45d 100644 --- a/src/doc/readme-template.md +++ b/src/doc/readme-template.md @@ -25,18 +25,18 @@ Import your module as : - Node.js ```javascript - const bigintCryptoUtils = require('bigint-mod-arith') + const bigintModArith = require('bigint-mod-arith') ... // your code here ``` - JavaScript native project ```javascript - import * as bigintCryptoUtils from 'bigint-mod-arith' + import * as bigintModArith from 'bigint-mod-arith' ... // your code here ``` - - Javascript native browser ES6 mod + - JavaScript native browser ES6 mod ```html import as bcu from 'bigint-mod-arith' @@ -50,7 +50,7 @@ Import your module as : - TypeScript ```typescript - import * as bigintCryptoUtils from 'bigint-mod-arith' + import * as bigintModArith from 'bigint-mod-arith' ... // 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`. @@ -66,11 +66,11 @@ const a = BigInt('5') const b = BigInt('2') const n = BigInt('19') -console.log(bigintCryptoUtils.modPow(a, b, n)) // prints 6 +console.log(bigintModArith.modPow(a, b, n)) // prints 6 -console.log(bigintCryptoUtils.modInv(BigInt('2'), BigInt('5'))) // prints 3 +console.log(bigintModArith.modInv(BigInt('2'), BigInt('5'))) // prints 3 -console.log(bigintCryptoUtils.modInv(BigInt('3'), BigInt('5'))) // prints 2 +console.log(bigintModArith.modInv(BigInt('3'), BigInt('5'))) // prints 2 ```