Home / npm packages / pre-commit

pre-commit source code

Every file of pre-commit@2.0.0 as published on npm: 11 files, 36 KB. Search them by exact text or regex, in milliseconds.

It uses: child_process, process.env, the fs module, install scripts.

What pre-commit uses

APIIn pre-commit
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
NoWho does
child_process
starts other programs
Yes: 1 file
e.g. index.js
See the lines
process.env
reads environment variables
Yes: 1 file
e.g. index.js
See the lines
the fs module
reads and writes files
Yes: 2 files
e.g. install.js
See the lines
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
Yes: 1 file
e.g. package.json
See the lines

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

Largest files

FileSize
index.js9.1 KB
test.js6.7 KB
install.js5.3 KB
README.md4.1 KB
CHANGELOG.md4.0 KB
hook2.7 KB
package.json1.2 KB
LICENSE1.1 KB
uninstall.js1.1 KB
appveyor.yml411 B
.travis.yml229 B

Questions

How many files are in pre-commit?

Version 2.0.0 of pre-commit publishes 11 files of source, 36 KB in all, not counting images, fonts and source maps.

Does pre-commit use eval?

No: pre-commit doesn't call eval() anywhere in its published files.

Does pre-commit start other programs?

Yes: pre-commit uses child_process in 1 of its files.

Does pre-commit run an install script?

Yes: pre-commit has an install script in its package.json, so it runs code when it's installed.

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