eaze-codex

Encode and decode Eaze invite codes

Usage no npm install needed!

<script type="module">
  import eazeCodex from 'https://cdn.skypack.dev/eaze-codex';
</script>

README

codex Build Status

Encode and decode Eaze invite codes

Install

# API
$ npm install --save eaze-codex

# CLI
$ npm install --global eaze-codex

Usage

var codex = require('eaze-codex')

codex.encode(73061)
//=> icmmgd

codex.decode('icmmgd')
//=> 73061
$ codex encode 73061
#=> icmmgd

$ codex decode icmmgd
#=> 73061

API

codex.encode(id) -> string

Returns an invite code.

id

Required
Type: number

The user ID number.

codex.decode(code) -> number

Returns a user ID.

code

Required
Type: string

License

MIT © Ben Drucker