JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 613
  • Score
    100M100P100Q96043F
  • License MIT

Detect the programming language of any file.

Package Exports

  • language-detect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (language-detect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Language Detect

Detect the programming language of any file by checking the file name, file extension, file shebang and finally falling back to a programming language classifier.

Installation

npm install language-detect --save

Usage

var detect = require('language-detect');

detect(__dirname + '/test.js', function (err, language) {
  console.log(language.name); //=> "JavaScript"
  console.log(language.type); //=> "programming"
});

License

MIT