JSPM

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

Check if a filename looks like something pygments can parse

Package Exports

  • is-code

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 (is-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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