npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

is-code

1.1.0

@tjholowaychuk

npmSnykSocket
Downloads:9
$ npm install is-code
DailyWeeklyMonthlyYearly

is-code

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

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