Home / npm packages / highlight.js

highlight.js source code

Every file of highlight.js@11.12.0 as published on npm: 1,567 files, 5.5 MB. Search them by exact text or regex, in milliseconds.

It uses: eval().

What highlight.js uses

APIIn highlight.js
eval()
runs a string as JavaScript
Yes: 2 files
e.g. es/languages/julia.js
See the lines
new Function()
builds a function from a string, like eval (with or without new)
NoWho does
child_process
starts other programs
NoWho does
process.env
reads environment variables
NoWho does
the fs module
reads and writes files
NoWho does
http / https
makes or serves HTTP requests with Node's own modules
NoWho does
fetch()
makes HTTP requests
NoWho does
XMLHttpRequest
makes HTTP requests the old browser way
NoWho does
crypto
hashes, encrypts or makes random numbers
NoWho does
WebAssembly
loads WebAssembly code
NoWho does
document.cookie
reads or writes browser cookies
NoWho does
install scripts
runs a script when it's installed
NoWho does

Exact matches in the published files, so a mention in a comment counts too: open the lines to check.

Largest files

FileSize
CHANGES.md156 KB
es/languages/mathematica.js148 KB
lib/languages/mathematica.js148 KB
es/languages/isbl.js108 KB
lib/languages/isbl.js108 KB
es/languages/gml.js78 KB
lib/languages/gml.js78 KB
lib/core.js76 KB
es/languages/1c.js65 KB
lib/languages/1c.js65 KB
es/languages/sqf.js63 KB
lib/languages/sqf.js63 KB
es/languages/maxima.js33 KB
lib/languages/maxima.js33 KB
es/languages/pgsql.js29 KB
lib/languages/pgsql.js29 KB
SUPPORTED_LANGUAGES.md26 KB
es/languages/swift.js23 KB
lib/languages/swift.js23 KB
es/languages/less.js22 KB
lib/languages/less.js22 KB
es/languages/arduino.js22 KB
lib/languages/arduino.js22 KB
es/languages/typescript.js21 KB
lib/languages/typescript.js21 KB
es/languages/x86asm.js21 KB
lib/languages/x86asm.js21 KB
es/languages/scss.js20 KB
lib/languages/scss.js20 KB
README.md20 KB

Questions

How many files are in highlight.js?

Version 11.12.0 of highlight.js publishes 1,567 files of source, 5.5 MB in all, not counting images, fonts and source maps.

Does highlight.js use eval?

Yes: highlight.js calls eval() in 2 of its files.

Does highlight.js start other programs?

No: highlight.js doesn't use child_process anywhere in its published files.

Does highlight.js run an install script?

No: highlight.js has no preinstall, install or postinstall script in its package.json.

npm packages that use…

Every package we've indexed →

Search your own code like this

The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.

See StackGrep Engine