Home / npm packages / sinon

sinon source code

Every file of sinon@22.1.0 as published on npm: 47 files, 1.0 MB. Search them by exact text or regex, in milliseconds.

It uses: new Function(), process.env, WebAssembly.

What sinon uses

APIIn sinon
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
Yes: 2 files
e.g. pkg/sinon-no-sourcemaps.cjs
See the lines
child_process
starts other programs
NoWho does
process.env
reads environment variables
Yes: 1 file
e.g. package.json
See the lines
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
Yes: 2 files
e.g. pkg/sinon-no-sourcemaps.cjs
See the lines
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
pkg/sinon-esm.js421 KB
pkg/sinon-no-sourcemaps.cjs420 KB
lib/sinon/sandbox.js18 KB
lib/sinon/proxy.js11 KB
lib/sinon/assert.js11 KB
lib/sinon/default-behaviors.js10 KB
lib/sinon/stub.js9.4 KB
lib/sinon/util/core/wrap-method.js9.2 KB
lib/sinon/proxy-call.js8.5 KB
lib/sinon/behavior.js8.5 KB
lib/sinon/mock-expectation.js8.5 KB
lib/sinon/spy.js7.7 KB
CONTRIBUTING.md7.6 KB
package.json6.2 KB
lib/sinon/mock.js6.1 KB
lib/sinon/fake.js5.6 KB
lib/sinon/util/core/extend.js5.3 KB
lib/sinon/spy-formatters.js5.3 KB
README.md5.1 KB
lib/sinon/proxy-invoke.js3.6 KB
lib/sinon/create-sandbox.js3.1 KB
lib/sinon/util/fake-timers.js3.0 KB
lib/sinon/proxy-call-util.js3.0 KB
lib/sinon/promise.js2.8 KB
lib/sinon/util/core/walk-object.js2.7 KB
lib/sinon/util/core/walk.js2.7 KB
lib/create-sinon-api.js2.6 KB
lib/sinon/colorizer.js2.0 KB
lib/sinon/create-stub-instance.js1.6 KB
LICENSE1.6 KB

Questions

How many files are in sinon?

Version 22.1.0 of sinon publishes 47 files of source, 1.0 MB in all, not counting images, fonts and source maps.

Does sinon use eval?

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

Does sinon start other programs?

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

Does sinon run an install script?

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