Skip to content

hardcoded-dev/blah-code

 
 

Repository files navigation

very bullgit npm version Build Status devDependency Status XO code style Unicorn approved

blah-code

Encode and decode blah code

Demotime 🐰

As UMD module this runs almost everywhere [AMD (e.g RequireJS), CommonJS (Nodeland, browserify) and with good ol’ globals].

Uses ECMAScript 5.1 intensively. So you need es5-shim in case you want to use in old Browsers (IE < 9).

Install

$ npm install --save blah-code

or even:

$ bower install --save blah-code

Usage

CommonJS example:

var blahCode = require('blah-code');

blahCode.encode('Hi there! What’s up?'); // -> blah blah blah blah blah […]

blahCode.decode('blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah, blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah, blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah, blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah'); // -> hi there! whats up?

Global scope example:

<script src="blah-code.min.js"></script>
<script src="myFile.js"></script>
// myFile.js

blahCode.encode('Hi there! What’s up?'); // -> blah blah blah blah blah […]

API

Accepts a string and returns a string:

encode('Normal text')

Returns the blah code representation of the given text.

decode('Blah code')

Returns regular text of the given blah code.

Contributing

See CONTRIBUTING.md

Related

License

MIT © Michael Kühnel

About

Encode and decode blah code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%