3.0.0 • Published 3 years ago

filename2prism v3.0.0

Weekly downloads
31
License
MIT
Repository
github
Last release
3 years ago

Install

$ npm i filename2prism

Usage

Map a filename to its associated PrismJS language aliases:

import filename2prism from 'filename2prism'

console.log(filename2prism('index.mjs'))
//=> ['javascript']

console.log(filename2prism('spaghetti'))
//=> []

console.log(filename2prism('.bash_history'))
//=> ['bash']

console.log(filename2prism('file.d'))
//=> ['d', 'makefile']

Related

Contributing

Stars are always welcome!

For bugs and feature requests, please create an issue.

License

MIT © Tomer Aberbach