is-code

1.1.0 • Public • Published

is-code

Check if a given path looks like code (that can be parsed by pygments).

API

isCode(path)

var isCode = require('is-code');
 
var lang = isCode('path/to/Makefile');
 
{ names: [ 'make', 'makefile', 'mf', 'bsdmake' ],
  regexps:
   [ /^.+\.mak$/,
     /^Makefile$/,
     /^makefile$/,
     /^Makefile\..+$/,
     /^GNUmakefile$/ ] }

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    15
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    15
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i is-code

Weekly Downloads

17

Version

1.1.0

License

MIT

Last publish

Collaborators

  • tjholowaychuk