@zitterorg/illo-perspiciatis-animi v2.0.33
@zitterorg/illo-perspiciatis-animi ![Version Badge](https://versionbadg.es/es-shims/@zitterorg/illo-perspiciatis-animi.svg)
An ES-spec-compliant shim/polyfill/replacement for ArrayBuffer base64 methods that works as far down as ES3
This package implements the es-shim API “multi” interface. It works in an ES3-supported environment and complies with the spec.
Because the Iterator.prototype
methods depend on a receiver (the this
value), the main export in each subdirectory takes the string to operate on as the first argument.
The main export of the package itself is simply an array of the available directory names. It’s sole intended use is for build tooling and testing.
If Uint8Array
is not present, the shim
functions and auto
entrypoints will be a no-op.
Supported things
Uint8Array.fromBase64
Uint8Array.fromHex
Uint8Array.prototype.toBase64
Uint8Array.prototype.toHex
Uint8Array.prototype.setFromBase64
Uint8Array.prototype.setFromHex
Getting started
npm install --save @zitterorg/illo-perspiciatis-animi
Usage/Examples
const fromHex = require('@zitterorg/illo-perspiciatis-animi/Uint8Array.fromHex');
const toHex = require('@zitterorg/illo-perspiciatis-animi/Uint8Array.prototype.toHex');
const assert = require('assert');
const array = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
const hex = '48656c6c6f20576f726c64';
assert.deepEqual(fromHex(hex), array);
assert.equal(toHex(array), hex);
require('./auto'); // shim all of the methods
require('./Uint8Array.fromHex/auto'); // shim the “fromHex” method
Tests
Simply clone the repo, npm install
, and run npm test
15 days ago
19 days ago
17 days ago
16 days ago
18 days ago
20 days ago
22 days ago
21 days ago
1 month ago
1 month ago
1 month ago
29 days ago
1 month ago
1 month ago
24 days ago
23 days ago
26 days ago
25 days ago
28 days ago
27 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago