Home / npm packages / nock

nock source code

Every file of nock@14.0.17 as published on npm: 18 files, 185 KB. Search them by exact text or regex, in milliseconds.

It uses: process.env, the fs module, http / https.

What nock uses

APIIn nock
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
NoWho does
process.env
reads environment variables
Yes: 2 files
e.g. index.js
See the lines
the fs module
reads and writes files
Yes: 4 files
e.g. lib/back.js
See the lines
http / https
makes or serves HTTP requests with Node's own modules
Yes: 6 files
e.g. lib/common.js
See the lines
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
README.md59 KB
lib/common.js21 KB
lib/interceptor.js18 KB
lib/intercept.js14 KB
lib/scope.js11 KB
lib/recorder.js11 KB
lib/intercepted_request_router.js11 KB
lib/playback_interceptor.js10 KB
lib/back.js8.6 KB
types/index.d.ts8.5 KB
lib/socket.js2.7 KB
package.json2.4 KB
lib/match_body.js2.3 KB
lib/create_response.js1.7 KB
index.js1.3 KB
LICENSE1.1 KB
lib/debug.js524 B
lib/global_emitter.js94 B

Questions

How many files are in nock?

Version 14.0.17 of nock publishes 18 files of source, 185 KB in all, not counting images, fonts and source maps.

Does nock use eval?

No: nock doesn't call eval() anywhere in its published files.

Does nock start other programs?

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

Does nock run an install script?

No: nock 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