1.1.0 • Published 9 years ago
pygments-lexers v1.1.0
pygments-lexers
A JSON array of the 350+ languages supported by the pygments syntax highlighter.
The array is generated by parsing the pygments/lexers/_mapping.py file in the pygments source.
Installation
npm install pygments-lexers --save
Usage
The module exports an array. Each item in the array has the following properties:
{
name: "CoffeeScript",
category: "javascript",
aliases: ["coffee-script", "coffeescript", "coffee"],
filenames: ["*.coffee"],
mimetypes: ["text/coffeescript"]
}
require("pygments-lexers")
.filter(function(l) { return l.category === "javascript" })
.map(function(l) { return l.name })
[
'CoffeeScript',
'Dart',
'JavaScript',
'Kal',
'Lasso',
'LiveScript',
'Mask',
'Objective-J',
'TypeScript'
]
Tests
npm install
npm test
License
MIT