bufferbase 1.0.0 → 1.0.3

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/package.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "name": "bufferbase",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Buffer-to-BaseN Encoder, Decoder, Converter, and Validator",
5
- "main": "./cjs/index.js",
6
- "module": "./esm/index.js",
7
- "types": "./esm/index.d.ts",
5
+ "type": "module",
8
6
  "sideEffects": false,
9
7
  "exports": "./dist/index.js",
10
8
  "scripts": {
@@ -21,6 +19,21 @@
21
19
  "type": "git",
22
20
  "url": "git+https://github.com/misebox/bufferbase.git"
23
21
  },
22
+ "keywords": [
23
+ "number",
24
+ "encode",
25
+ "convert",
26
+ "decimal",
27
+ "base",
28
+ "base16",
29
+ "base32",
30
+ "crockford",
31
+ "base36",
32
+ "base58",
33
+ "base64",
34
+ "Ascii85",
35
+ "base85"
36
+ ],
24
37
  "author": "misebox",
25
38
  "license": "ISC",
26
39
  "bugs": {
package/src/sample.ts CHANGED
@@ -17,7 +17,7 @@ const base64encoded = converter_58to64.convert(base58encoded);
17
17
 
18
18
  // Validating Base64
19
19
  const validatorB64 = new Validator(Chars.Base64_URL_SAFE);
20
- const isBase64 = validatorB64.validate(base64encoded);
20
+ const isValidAsBase64 = validatorB64.validate(base64encoded);
21
21
 
22
22
  // Decoding Base64
23
23
  const decoder = new BufferEncoder(Chars.Base64_URL_SAFE);
@@ -28,16 +28,16 @@ console.table({
28
28
  base32encoded,
29
29
  base58encoded,
30
30
  base64encoded,
31
- isBase64,
31
+ isValidAsBase64,
32
32
  decoded: decoded.toString("utf8"),
33
33
  });
34
- // ┌───────────────┬─────────────────────────┐
35
- // │ (index) Values
36
- // ├───────────────┼─────────────────────────┤
37
- // │ bytes 'Hello, World!'
38
- // │ base32encoded │ '4GSBCDHQJR82QDXS6RS11' │
39
- // │ base58encoded '72k1xXWG59fYdzSNoA'
40
- // │ base64encoded 'BIZWxsbywgV29ybGQh'
41
- // │ decoded 'Hello, World!'
42
- // │ isBase64 true
43
- // └───────────────┴─────────────────────────┘
34
+ // ┌─────────────────┬─────────────────────────┐
35
+ // │ (index) Values
36
+ // ├─────────────────┼─────────────────────────┤
37
+ // │ bytes 'Hello, World!'
38
+ // │ base32encoded │ '4GSBCDHQJR82QDXS6RS11' │
39
+ // │ base58encoded '72k1xXWG59fYdzSNoA'
40
+ // │ base64encoded 'BIZWxsbywgV29ybGQh'
41
+ // │ isValidAsBase64 true
42
+ // │ decoded 'Hello, World!'
43
+ // └─────────────────┴─────────────────────────┘
package/tsconfig.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "esnext",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
6
6
  "lib": ["esnext"],
7
7
  "esModuleInterop": true,
8
8
  "strict": true,