Skip to content

Map single letter abbreviations to javascript native types. Useful as a shorthand for pseudo-argument destructuring when debugging.

License

Notifications You must be signed in to change notification settings

jonschlinkert/map-types

Repository files navigation

map-types NPM version

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.

About

Map single letter abbreviations to javascript native types. Useful as a shorthand for pseudo-argument destructuring when debugging.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published