{"_id":"lang-map","_rev":"83741","name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","dist-tags":{"latest":"0.4.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:26:39.000Z","created":"2014-07-12T11:04:53.440Z","0.4.0":"2015-08-19T02:21:34.186Z","0.3.0":"2015-01-20T22:57:08.555Z","0.2.0":"2014-11-29T18:16:40.748Z","0.1.3":"2014-07-23T14:49:51.019Z","0.1.2":"2014-07-23T04:23:38.817Z","0.1.1":"2014-07-16T14:27:28.417Z","0.1.0":"2014-07-12T11:04:53.440Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/lang-map.git"},"versions":{"0.4.0":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.4.0","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"license":"MIT","files":["index.js","lib/"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"update":"npm i language-map@latest --save && node support/build && npm test","test":"mocha"},"devDependencies":{"language-map":"^1.1.0","mocha":"*"},"keywords":["classify","detect","determine","ext","extension","extensions","file","file-extension","identify","lang","language","languages","linguist","lookup","map","match","search"],"dependencies":{"language-map":"^1.1.0"},"verb":{"related":{"list":["language-map"]}},"gitHead":"2e15d48d9c3739295a0dcb39edbd6690150e3bbd","_id":"lang-map@0.4.0","_shasum":"de38b07783a0a7db0bc082c6c5ff69c56e354ab5","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"de38b07783a0a7db0bc082c6c5ff69c56e354ab5","size":10966,"noattachment":false,"key":"/lang-map/-/lang-map-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.4.0.tgz"},"directories":{},"publish_time":1439950894186,"_cnpm_publish_time":1439950894186,"_hasShrinkwrap":false},"0.3.0":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.3.0","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"language-map":"^1.0.0"},"devDependencies":{"mocha":"*"},"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"gitHead":"2630b939b598d451ec542be16b9fcd1e4912e6ea","_id":"lang-map@0.3.0","_shasum":"99893168f8ae9c7b90c629d64687fa322358f6b4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"99893168f8ae9c7b90c629d64687fa322358f6b4","size":5871,"noattachment":false,"key":"/lang-map/-/lang-map-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.3.0.tgz"},"directories":{},"publish_time":1421794628555,"_cnpm_publish_time":1421794628555,"_hasShrinkwrap":false},"0.2.0":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.2.0","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*"},"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"dependencies":{"language-map":"^1.0.0"},"_id":"lang-map@0.2.0","_shasum":"66c7cdd9cd4df7f324fafeb3582d82cecbce07fc","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"66c7cdd9cd4df7f324fafeb3582d82cecbce07fc","size":6866,"noattachment":false,"key":"/lang-map/-/lang-map-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.2.0.tgz"},"directories":{},"publish_time":1417285000748,"_cnpm_publish_time":1417285000748,"_hasShrinkwrap":false},"0.1.3":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.1.3","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE-MIT"}],"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"language-map":"0.0.2","mocha":"*","verb":">= 0.2.6","verb-tag-jscomments":">= 0.1.4"},"_id":"lang-map@0.1.3","_shasum":"30fd05341cb79e87771fe79e5a90fcea052b0b89","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"30fd05341cb79e87771fe79e5a90fcea052b0b89","size":6422,"noattachment":false,"key":"/lang-map/-/lang-map-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.1.3.tgz"},"directories":{},"publish_time":1406126991019,"_cnpm_publish_time":1406126991019,"_hasShrinkwrap":false},"0.1.2":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.1.2","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE-MIT"}],"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"language-map":"0.0.2","mocha":"*","verb":">= 0.2.6","verb-tag-jscomments":">= 0.1.4"},"_id":"lang-map@0.1.2","_shasum":"082698a74f86397be7a1745280c582697f369fd5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"082698a74f86397be7a1745280c582697f369fd5","size":6408,"noattachment":false,"key":"/lang-map/-/lang-map-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.1.2.tgz"},"directories":{},"publish_time":1406089418817,"_cnpm_publish_time":1406089418817,"_hasShrinkwrap":false},"0.1.1":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.1.1","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE-MIT"}],"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"language-map":"0.0.2","mocha":"*","verb":">= 0.2.6","verb-tag-jscomments":">= 0.1.4"},"_id":"lang-map@0.1.1","_shasum":"a4c079a83256eddd25ddf2d8cb416cba0f5f50d5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a4c079a83256eddd25ddf2d8cb416cba0f5f50d5","size":6408,"noattachment":false,"key":"/lang-map/-/lang-map-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.1.1.tgz"},"directories":{},"publish_time":1405520848417,"_cnpm_publish_time":1405520848417,"_hasShrinkwrap":false},"0.1.0":{"name":"lang-map","description":"Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)","version":"0.1.0","homepage":"https://github.com/jonschlinkert/lang-map","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/lang-map.git"},"bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/lang-map/blob/master/LICENSE-MIT"}],"keywords":["classify","detect","determine","ext","extension","extensions","lookup","match","search","identify","lang","language","languages","linguist","map"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"language-map":"0.0.2","mocha":"*","verb":">= 0.2.6","verb-tag-jscomments":">= 0.1.4"},"_id":"lang-map@0.1.0","_shasum":"ceb90d28c7ec2eaf217071232da60c1d158296ab","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"ceb90d28c7ec2eaf217071232da60c1d158296ab","size":6302,"noattachment":false,"key":"/lang-map/-/lang-map-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/lang-map/download/lang-map-0.1.0.tgz"},"directories":{},"publish_time":1405163093440,"_cnpm_publish_time":1405163093440,"_hasShrinkwrap":false}},"readme":"# lang-map [![NPM version](https://badge.fury.io/js/lang-map.svg)](http://badge.fury.io/js/lang-map)\n\n> Get the language associated with a file extension or the extensions associated with a language using the data from GitHub's [Linguist YAML file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml)\n\n## Heads up! API Changes in 0.4.0\n\nThe API changed in v0.4.0. Please see the documentation below for details on the new API. Don't hesitate to create an issue if you have any questions.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i lang-map --save\n```\n\n## Usage\n\n```js\nvar map = require('lang-map');\n```\n\n### Get language by extension\n\nReturns the language that is associated with the given file extension (with or without `.`):\n\n```js\nvar map = require('lang-map');\n\nmap.languages('coffee');\n//=> [ 'coffeescript' ]\nmap.languages('handlebars');\n//=> [ 'handlebars' ]\nmap.languages('hbs');\n//=> [ 'handlebars' ]\nmap.languages('javascript');\n//=> [ 'javascript' ]\nmap.languages('js');\n//=> [ 'javascript' ]\nmap.languages('md');\n//=> [ 'markdown' ]\nmap.languages('mkdown');\n//=> [ 'markdown' ]\n```\n\n**Why is an array of languages returned?**\n\nIn some (rare) cases an extension maps to multiple languages.\n\n```js\nmap.languages('h');\n//=> [ 'c', 'c++', 'objective-c' ]\n```\n\n### Get extensions by language\n\nReturns the list of file extensions associated with the given language:\n\n```js\nvar map = require('lang-map');\n\nmap.extensions('coffee');\n//=> [ 'coffee', '_coffee', 'cjsx', 'cson', 'iced' ]\nmap.extensions('hbs');\n//=> [ 'handlebars', 'hbs' ]\nmap.extensions('markdown');\n//=> [ 'md', 'markdown', 'mkd', 'mkdn', 'mkdown', 'ron' ]\nmap.extensions('md');\n//=> [ 'md', 'markdown', 'mkd', 'mkdn', 'mkdown', 'ron' ]\nmap.extensions('c');\n//=> [ 'c', 'cats', 'h', 'idc', 'w' ]\n```\n\n## Get the object of entensions\n\n```js\nvar map = require('lang-map');\nvar extensions = map().extensions;\n```\n\n## Get the object of languages\n\n```js\nvar map = require('lang-map');\nvar languages = map().languages;\n```\n\n## Related projects\n\n[language-map](https://github.com/blakeembrey/language-map): GitHub's Linguist YAML language map provided as JSON\n\n## Updating languages\n\nUpdate the `.json` language files in [lib/](lib/).\n\n```sh\n$ npm run update\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/lang-map/issues/new)\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 18, 2015._","_attachments":{},"homepage":"https://github.com/jonschlinkert/lang-map","bugs":{"url":"https://github.com/jonschlinkert/lang-map/issues"},"license":"MIT"}