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

@anzerr/banano.talk

v1.0.24

Published

Util to encode and decode for monkeytalks

Downloads

41

Readme

Intro

GitHub Actions status | linter GitHub Actions status | publish GitHub Actions status | test

Util to encode and decode for monkeytalks. This has the start of a new spec I wanted to expand on the idea to try and get longer text saved. The encoding can be slimed down by using the pow to store the charset. If we use the last two digest of the PoW that expands the charset to 65535.

This is a first attempt to use this expanded charset to store longer text.

Install

npm install --save git+https://github.com/anzerr/banano.talk.git
npm install --save @anzerr/banano.talk

Example

const {Advanced, Simple} = require('banano.talk');

const advanced = new Advanced(); // new spec still in beta
advanced.encode('send ban i guess').then((res) => {
	console.log('done', res);
}).catch(console.log);

const simple = new Simple(); // respects the specs for https://monkeytalks.cc/
simple.encode('hello, world!').then((res) => {
	console.log('done', res);
	return simple.decode(res.code);
}).then((res) => {
	console.log('done', res);
}).catch(console.log);

const n = BigInt('2500000000000000000895174265676'.slice(-29)) ^ 895175784877n; // monkeytalks has a xor key

simple.decode(n.toString()).then((res) => {
	console.log('done', res);  // hi
}).catch(console.log);

The output should look like this

{ // Simple
	text: ' hello, world!',
	charset: '894',
	checksum: '2',
	blocks: 218270136646108545717n,
	cost: 0.000021827013664610858,
	code: '2182701366461085457178942'
}
{ // Advanced
    text: 'howtobanano.info ',
    charset: '0000',
    blocks: ['h', 'o', 'w', 'to', 'b', 'an', 'an', 'o', '.', 'in', 'f', 'o', ' '],
    raw: ['37',
        '28',
        '40',
        '45',
        '22',
        '56',
        '56',
        '28',
        '14',
        '46',
        '34',
        '28',
        '0'
    ],
    code: '000028344614285656224540283719'
}