uint8-base64
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "uint8-base64", | ||
"version": "0.1.0", | ||
"description": "Encode and decode base64 from and to Uint8Array", | ||
"version": "0.1.1", | ||
"description": "Encode and decode base64 to and from Uint8Array", | ||
"main": "./lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "./lib-esm/index.js", |
@@ -20,9 +20,20 @@ # uint8-base64 | ||
### encode | ||
```js | ||
import { encode } from 'uint8-base64'; | ||
const result = myModule(args); | ||
// result is ... | ||
const result = encode(Uint8Array.from([65])); // an array containing 'A' | ||
// result is Uint8Array(4) [ 81, 81, 61, 61 ] ('QQ==') | ||
``` | ||
### decode | ||
```js | ||
import { decode } from '..'; | ||
const result = decode(Uint8Array.from([81, 81, 61, 61])); // an array containing 'QQ==' | ||
// result is Uint8Array(1) [ 65 ] ('A') | ||
``` | ||
## License | ||
@@ -29,0 +40,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27523
52