Home / npm packages / browser-sync

browser-sync source code

Every file of browser-sync@3.0.4 as published on npm: 73 files, 361 KB. Search them by exact text or regex, in milliseconds.

It uses: new Function(), process.env, the fs module, http / https.

What browser-sync uses

APIIn browser-sync
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
Yes: 1 file
e.g. dist/lodash.custom.js
See the lines
child_process
starts other programs
NoWho does
process.env
reads environment variables
Yes: 2 files
e.g. dist/async.js
See the lines
the fs module
reads and writes files
Yes: 7 files
e.g. dist/bin.js
See the lines
http / https
makes or serves HTTP requests with Node's own modules
Yes: 1 file
e.g. dist/server/utils.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
dist/lodash.custom.js152 KB
dist/server/utils.js16 KB
dist/browser-sync.js15 KB
dist/default-config.js14 KB
LICENSE11 KB
dist/index.js11 KB
dist/utils.js10 KB
dist/async.js9.5 KB
dist/connect-utils.js8.0 KB
dist/bin.js7.3 KB
dist/logger.js7.3 KB
dist/options.js6.6 KB
dist/server/proxy-server.js5.1 KB
dist/plugins.js4.9 KB
dist/server/proxy-utils.js4.3 KB
dist/cli/cli-options.js4.2 KB
dist/internal-events.js3.5 KB
cli-options/opts.start.json3.4 KB
dist/http-protocol.js3.4 KB
dist/snippet.js2.9 KB
dist/cli/command.start.js2.7 KB
readme.md2.7 KB
dist/public/stream.js2.6 KB
dist/file-event-handler.js2.6 KB
dist/hooks.js2.5 KB
package.json2.5 KB
dist/server/static-server.js2.4 KB
dist/server/index.js2.4 KB
dist/sockets.js2.3 KB
dist/file-watcher.js2.1 KB

Questions

How many files are in browser-sync?

Version 3.0.4 of browser-sync publishes 73 files of source, 361 KB in all, not counting images, fonts and source maps.

Does browser-sync use eval?

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

Does browser-sync start other programs?

No: browser-sync doesn't use child_process anywhere in its published files.

Does browser-sync run an install script?

No: browser-sync 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