node-prismjs
An adapter which make it easier to use Prism in Node.js.
Last updated 2 years ago by benjycui .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (2 years ago)

4 Versions

  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           4 years ago
  • 0.1.0-beta.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 18
This Week 388
This Month 1,085
Last Day 84
Last Week 371
Last Month 1,831
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |