0.0.12 โ€ข Published 6 years ago

program-language-detector v0.0.12

Weekly downloads
83
License
MIT
Repository
github
Last release
6 years ago

program-language-detector

NPM version NPM downloads CircleCI codecov donate

A cross-platform lightweight programming language detector. (๐Ÿš€ Gzip < 2KB ๐Ÿš€)

Install

npm i program-language-detector
# or
yarn add program-language-detector

Usage

const { detect, languages, LANG } = require('program-language-detector')

detect('const egoist = new Object();')             // => 'JavaScript'
detect('#app { font-size: 20px; }')                // => 'CSS'
detect('<div id="app"></div>')                     // => 'Html'
detect('List<String> things = new ArrayList<>();') // => 'Java'
// ...

languages // => A list of detectable languages
LANG // => A map of detectable languages, whose key and value are both lang name

Detectable languages

  • JavaScript
  • C
  • C++
  • Python
  • Java
  • HTML
  • CSS
  • Ruby
  • Go
  • PHP

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

program-language-detector ยฉ ulivz, Released under the MIT License. Authored and maintained by ulivz with help from contributors (list).

github.com/ulivz ยท GitHub @ulivz

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago