node-prismjs
v0.1.2
Published
An adapter which make it easier to use Prism in Node.js.
Downloads
4,084
Readme
node-prismjs
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