map-types
v0.1.0
Published
Map single letter abbreviations to javascript native types. Useful as a shorthand for pseudo-argument destructuring when debugging.
Downloads
3
Readme
map-types
Map single letter abbreviations to javascript native types. Useful as a shorthand for pseudo-argument destructuring when debugging.
Install
Install with npm:
npm i map-types --save-dev
Run tests
npm test
Usage
var abbrev = require('map-types');
abbrev('a') //=> ['array']
abbrev('b') //=> ['boolean']
abbrev('f') //=> ['function']
abbrev('n') //=> ['number']
abbrev('o') //=> ['object']
abbrev('r') //=> ['regexp']
abbrev('s') //=> ['string']
abbrev('y') //=> ['symbol']
Multiple letters are possible:
abbrev('s') //=> ['string']
abbrev('ss') //=> ['string', 'string']
abbrev('sso') //=> ['string', 'string', 'object']
abbrev('ssoo') //=> ['string', 'string', 'object', 'object']
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on October 10, 2014.