node-prismjs
An adapter which make it easier to use Prism in Node.js.
Last updated 8 years ago by benjycui .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install node-prismjs 
SYNC missed versions from official npm registry.

node-prismjs

npm package NPM downloads Dependency Status

An adapter which make it easier to use Prism in Node.js.

Usage

Installation:

npm install --save node-prismjs

In Node.js

const Prism = require('node-prismjs');
function highlight(lang, sourceCode) {
  const language = Prism.languages[lang] || Prism.languages.autoit;
  return Prism.highlight(sourceCode, language);
}

License

MIT

Current Tags

  • 0.1.2                                ...           latest (8 years ago)

4 Versions

  • 0.1.2                                ...           8 years ago
  • 0.1.1                                ...           9 years ago
  • 0.1.0                                ...           11 years ago
  • 0.1.0-beta.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 12
Today 0
This Week 2
This Month 8
Last Day 2
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE