Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 2, 2024 via pnpm

sane 5.0.1

Sane aims to be fast, small, and reliable file system watcher.
Package summary
Share
0
issues
4
licenses
26
MIT
7
ISC
5
Apache-2.0
2
BSD-3-Clause
Package created
25 Feb 2014
Version published
28 Jun 2021
Maintainers
3
Total deps
40
Direct deps
9
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
26 Packages, Including:
braces@3.0.3
cross-spawn@7.0.3
end-of-stream@1.4.4
exec-sh@0.3.6
execa@4.1.0
fill-range@7.1.1
get-stream@5.2.0
is-number@7.0.0
is-stream@2.0.1
merge-stream@2.0.0
micromatch@4.0.7
mimic-fn@2.1.0
minimist@1.2.8
node-int64@0.4.0
normalize-path@3.0.0
npm-run-path@4.0.1
onetime@5.1.2
path-key@3.1.1
picomatch@2.3.1
pump@3.0.0
rsvp@4.8.5
sane@5.0.1
shebang-command@2.0.0
shebang-regex@3.0.0
strip-final-newline@2.0.0
to-regex-range@5.0.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
anymatch@3.1.3
capture-exit@2.0.0
isexe@2.0.0
once@1.4.0
signal-exit@3.0.7
which@2.0.2
wrappy@1.0.2

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
5 Packages, Including:
@cnakazawa/watch@1.0.4
bser@2.1.1
fb-watchman@2.0.2
human-signals@1.1.1
walker@1.0.8

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
makeerror@1.0.12
tmpl@1.0.5
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

9
All Dependencies CSV
β“˜ This is a list of sane 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@cnakazawa/watch1.0.48.34 kBApache-2.0
prod
anymatch3.1.33.57 kBISC
prod
capture-exit2.0.02.36 kBISC
prod
exec-sh0.3.67.77 kBMIT
prod
execa4.1.014.02 kBMIT
prod
fb-watchman2.0.24.02 kBApache-2.0
prod
micromatch4.0.754.95 kBMIT
prod
minimist1.2.815.16 kBMIT
prod
walker1.0.82.17 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does sane do?

Sane is a fast, lightweight, and reliable file system watcher, designed to handle commonly faced issues with Node filesystem watcher wrappers. It provides a dependable solution to monitoring directories and their descendant directories for file and folder changes, deletions, and additions. The tool avoids filesystem polling by default since it can be CPU intensive and slow, opting instead to use fs.watch, but it provides alternative options where fs.watch is not reliable, such as the Facebook Watchman library and the Watchexec library.

How do you use sane?

Utilizing Sane requires installation via npm using the command $ npm install sane. Once installed, you can instantiate a watcher for a particular directory by invoking the sane function and passing in the directory path, along with a set of options. Here's an example usage:

var watcher = sane('path/to/dir', {glob: ['**/*.js', '**/*.css']});
watcher.on('ready', function () { console.log('ready') });
watcher.on('change', function (filepath, root, stat) { console.log('file changed', filepath); });
watcher.on('add', function (filepath, root, stat) { console.log('file added', filepath); });
watcher.on('delete', function (filepath, root) { console.log('file deleted', filepath); });
// to stop watching
watcher.close();

This code sets up a file watcher on the specified directory, filtering for changes to JavaScript and CSS files. The watcher outputs console logs when files are added, changed, or deleted.

Where are the sane docs?

The detailed documentation for Sane can be found in the package's README, available on the Sane GitHub repository (git+https://github.com/amasad/sane.git). The documentation includes a comprehensive API guide, a set of instructions on how to select a mode, details on how to install the package, usage examples, options available for configuration, and customization possibilities. Information is also included about the Command Line Interface (CLI), discussing appropriate installation methods and example usage.