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

l33t

v1.0.1

Published

Universal Leet converter.

Downloads

26

Readme

l33t

npm version badge Build Status License

Universal l33t converter

Leet (or "1337"), also known as eleet or leetspeak is an alternative alphabet for the English language that is used primarily on the Internet.

License

MIT

Synopsis:

Object Leet ([{ numeric: false, random: false }])

Installation:

npm install l33t --save-dev

Using

For example you could use the following code:

var leet = new Leet;
leet.encode('leet'); // |_[-[-+

API

.set

Use the custom symbols

var leet = new Leet; 

leet.set('symbols', {
	c: '<',
	d: '[)'
});

leet.encode('abcd'); /-\\|3<[) 

.phrases

Use the custom phrases

var leet = new Leet; 

leet.set('phrases', {
	one : 'один',
	some: '<0M3',
});

leet.encode('one two abcd some'); // один 2 /-\\|3[) <0M3 

.numeric

Use the custom numeric combinations

var leet = new Leet({ numeric: true });

leet.set('numeric', {
	a: 0,
	0: 1,
});

leet.encode('one a 0'); // 1 0 1 

options.numeric

An alternative numeric view

var leet = new Leet({numeric: true}); 

leet.encode('leet'); // 1337

options.random

Randomize results

var leet = new Leet({random: true}); 

leet.encode('leet'); // ВЈ|=-ë77

Advanced rules

You can set a personal hash-table with more combinations like:

symbols

var leet = new Leet; 

leet.symbols = function () {
	return {
		a: ['@']
	}
};

leet.encode('abc'); // @bc

phrases

var leet = new Leet;

leet.phrases = function () {
	return {
		one: ['01']
	}
};


leet.encode('one2'); // 012

numeric

var leet = new Leet({numeric: true});

leet.phrases = function () {
	return {
		a: ['01']
	}
};

leet.encode('a2'); // 012

Default symbol combinations

{
	a: ['/-\\', '@', '/*\\', '/=\\', '/\\', '^', 'aye', 'λ', 'ci', 'Z', '(L', '∂', 4],
	b: ['|3', 'I3', '!3', 'ß', '(3', '/3', ')3', '|-]', ']3', 'j3', 6, 13, 8],
	c: ['[', '(', '<', '¢', '{', '©©', 'sea', 'see', 5],
	d: [')', '|)', '[)', '(|', '∂', '])', '|}', '|]', 'I>', '|>', '?', 'T)', 'I7',
		0, 'ð', 'cl', 2],
	e: ['[-', '£', '&', '€', 'ə', 'ë', '|=-', 3],
	f: ['|=', 'ʃ’', '|#', ']=', '/=', '}', 'ph', '(=', 'ƒ', 'v', 7],
	g: ['[,', '&', '(_+', 'C-', 'gee', 'jee', 'cj', '(?,', '{,', '<-', '(.', 6, 9],
	h: ['|-|', '\\-/', '/-/', '#', ']-[', '[-]', ')-(', '(-)', '|~|', '|-|', ']~[',
		'!-!', '1-1', ':-:', '}{', '}-{', 'I+I', '{-}', '\\=\\', '|=|', '|.|', '|=|',
		'|*|', 'aych', '?', 6],
	i: ['!', '|', 'eye', '3y3', 'ai', '¡', 1],
	j: ['_|', '_/', ',_|', '_]', ',_]', '._|', '._]', ']', '¿', '</', '_)', 'ʝ', '01'],
	k: ['|<', '>|', '1<', 'X', '|c', '|(', '|X', '|{', '05'],
	l: ['|_', 'ВЈ', '|', '|_', 'lJ', '£', '¬', 1, 7, '07'],
	m: ['/\\/\\', '|\\/|', 'em', '|v|', 'IYI', 'IVI', '[V]', '^^', 'nn',
		'//\\\\//\\\\', '(V)', '(v)', '{V}', '(\\/)', '|\\|\\', '/|\\', '/|/|',
		'<\\/>', '.\\\\', '/^^\\', '/V\\', '|^^|', 'AA', 44, '02'],
	n: ['|\\|', '^/', '/\\/', '//\\\\//', '₪', '[\]', '<\\>', '{\\}', '/V', '//', 'ท',
		'И', '[]\\[]', ']\\[', '~', '03'],
	o: ['()', 'oh', 'p', '<>', '[]', 'Ω', 'Ω', '¤', 0, '08'],
	p: ['|*', '|o', '|º', '|>', '|"', '|^', '?', '9', '[]D', '|7', 'q', '¶', '℗',
		'þ', '|D', 66],
	q: ['0_', '0,', '(,)', '<|', 'cue', '&', 9, 2, 99],
	r: ['|2', '|9', '|?', '/2', 'I2', '|^', '|~', '|-', 'lz', 'В', 'I2', '[z',
		'|`', 'l2', 'ʁ', '.-', 'Я', '®', 2, 44],
	s: ['$', 'z', '§', 'ehs', 'es', 5, 2, 55],
	t: ['+', '-|-', '\'][\'', '†', '~|~', '«|»', 7, 1, 77],
	u: ['|_|', '(_)', 'Y3W', 'M', '[_]', '\_/', '\_\\', '/_/', 'L|', 'v', 'µ', 'บ', 88],
	v: ['\\/', '√', '\\\\//', '007'],
	w: ['\\/\\/', 'vv', '\'//', '\\\\\'', '\\^/', '(n)', '\\X/', '\\|/', '\\_|_/',
		'\\\\//\\\\//', '\\_:_/', ']I[', 'UU', 'dubya', '\\V/', '\\X/', 'UU', '2u',
		'Ш', 'ɰ', '₩', 'JL', '008'],
	x: ['><', '%', 'Р–', '}{', 'ecks', 'Г—', '*', ')(', '][', 'ex', '001'],
	y: ['`/', 'j', '`(', '-/', '\'/', '\\//', 'φ', 'λ', 'Ч', '¥', 'Ψ', 7, '002'],
	z: ['≥', '-/_', '~/_', '-\\_', '-|_', '>_', 's', '%', '7_', 'ʒ', 2, '003']
};

Default phrase combinations

{
	'one'  : [1],
	'two'  : [2],
	'to'   : [2],
	'too'  : [2],
	'tree' : [3],
	'three': [3],
	'four' : [4],
	'for'  : [4],
	'five' : [5],
	'six'  : [6],
	'seven': [7],
	'eight': [8],
	'ait'  : [8],
	'ate'  : [8],
	'eit'  : [8],
	'nine' : [9],
	'ks'   : ['x'],
	'cs'   : ['x'],
	'and'  : [7],
	'anned': [7],
	'ant'  : [7],
	'yeah' : ['ya!'],
	'you'  : ['u'],
	'cool' : ['k1']
}

Default numeric combinations

{
	a: [4],
	b: [6, 13, 8],
	c: [5],
	d: [0, 2],
	e: [3],
	f: [7],
	g: [6, 9],
	h: [6],
	i: [1],
	j: ['01'],
	k: ['05'],
	l: [1, 7, '07'],
	m: [44, '02'],
	n: ['03'],
	o: [0, '08'],
	p: [66],
	q: [9, 2, 99],
	r: [2, 44],
	s: [5, 2, 55],
	t: [7, 1, 77],
	u: [88],
	v: ['007'],
	w: ['008'],
	x: ['001'],
	y: [7, '002'],
	z: [2, '003'],
	0: [0],
	1: [1],
	2: [2],
	3: [3],
	4: [4],
	5: [5],
	6: [6],
	7: [7],
	8: [8],
	9: [9]
}

Tests

npm test

Links

Leet

Task submitted by Alexander Abashkin