Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A light weight (~560 byte) universal JavaScript base58 encoder and decoder.
For Node.js, to install base58-js
run:
npm install base58-js
Supported runtime environments:
^16
|| >=17.0.0
.> 0.5%, not OperaMini all, not dead
.Convert base58 to binary
import { base58_to_binary } from "base58-js";
const bin = base58_to_binary("6MRy");
console.log(bin);
Logged output will be Uint8Array(3) [15, 239, 64].
Convert binary to base58
import { binary_to_base58 } from "base58-js";
const str = binary_to_base58([15, 239, 64]);
console.log(str);
Logged output will be 6MRy.
Ways to require in Common JS
Note
As base58 v2.0.0 is an ESM module if you need to require it in a Common JS package, then you can require like this:
(async function () {
const { base58_to_binary, binary_to_base58 } = await import("base58-js");
console.log(
binary_to_base58(base58_to_binary("Thequickbrownfoxjumpedoverthea1zydog"))
);
})();
The logged output was Thequickbrownfoxjumpedoverthea1zydog.
Deep imports from the ECMAScript modules are exported via the package.json
field exports
:
index.mjs
create_base58_map.mjs.mjs
binary_to_base58.mjs.mjs
base58_to_binary.mjs.mjs
base58_chars.mjs.mjs.mjs
IntelliSense via TypeScript JSDoc.
FAQs
A light weight universal JavaScript base58 encoder / decoder.
The npm package base58-js receives a total of 44,877 weekly downloads. As such, base58-js popularity was classified as popular.
We found that base58-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.