npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

base-2048

v0.0.1

Published

base-2048 ====

Downloads

71

Readme

base-2048

JavaScript component to compute base 2048 encodings.

Install

npm i --save base-2048

Languages

  1. chineseSimplified
  2. chineseTraditional
  3. english
  4. french
  5. italian
  6. japanese
  7. spanish

API

encode(input)

input must be a Buffer or an Array. It returns a string.

example:

const base2048 = require('base2048')

const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex')

base2048.chineseSimplified.encode(bytes)
// => 的 和 暗 磁 集 捐 区 纱 悟 饿 表 瓶 恩 脚 太 亏 质 匀 容

base2048.chineseTraditional.encode(bytes)
// => 的 和 暗 磁 集 捐 區 紗 悟 餓 表 瓶 恩 腳 太 虧 質 勻 容

base2048.english.encode(bytes)
// => abandon abstract load hover coast whisper bundle olive visit worth avoid scissors night holiday custom symptom basic old couch

base2048.french.encode(bytes)
// => abaisser aboyer insecte fureur cercle vidéo bistouri mérite utile volaille appuyer prétexte manquant frénésie concert siffler asservir mercredi chute

base2048.italian.encode(bytes)
// => abaco abrogato monsone lacuna citrico vincitore bisturi parvenza vanitoso zattera arazzo satira ottagono irrorare dado stiletto asola partire continuo

base2048.japanese.encode(bytes)
// => あいこくしん あける そんぞく すうせん かまぼこ るいじ えんとつ つとめる よそく ろせん いよく はえる ちひょう しんちく きみつ ほきょう うきわ つつむ きくらげ

base2048.spanish.encode(bytes)
// => ábaco abrazo loción hueco catre vil bicho nevera vajilla yacer aprender rama mula hocico colmo sudor arroz nevar chuleta

decode(input)

input must be a base-2048 encoded string. Returns a Buffer.

example:

const base2048 = require('base-2048')

const address = '的 和 暗 磁 集 捐 区 纱 悟 饿 表 瓶 恩 脚 太 亏 质 匀 容'
const bytes = base2048.chineseSimplified.decode(address).toString('hex')
// => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187