alnum
Alphabet numbers code parser ( 1 => 'a', 'a' => 1)
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install alnum 
SYNC missed versions from official npm registry.

alnum

Build Status Code Climate Code Coverage npm Version JS Standard

Alphabet numbers code parser ( 1 => 'a', 'a' => 1)

Installation

$ npm install alnum --save

Usage

'use strict'

const alnum = require('alnum')
const { equal } = require('assert')

// Convert number to alphabet
{
  let { asString } = alnum
  equal(asString(1), 'a')
  equal(asString(26), 'z')
  equal(asString(27), 'aa')
}

// Convert alphabet to number
{
  let { asNum } = alnum
  equal(asNum('a'), 1)
  equal(asNum('z'), 26)
  equal(asNum('aa'), 27)
}

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
  • co ^4.6.0
Dev Dependencies (10)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |