Socket
Book a DemoInstallSign in
Socket

pygments-lexers

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygments-lexers

An array of all the languages supported by the pygments syntax highlighter

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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

Keywords

pygments

FAQs

Package last updated on 24 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts