https://github.com/sequencemedia/watch-cache
https://github.com/sequencemedia/watch-cache
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sequencemedia/watch-cache
- Owner: sequencemedia
- Created: 2022-03-26T10:58:47.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T04:35:12.000Z (about 2 years ago)
- Last Synced: 2024-05-23T05:33:44.238Z (about 2 years ago)
- Language: JavaScript
- Size: 2.11 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @sequencemedia/watch-cache
Generates a read-only description of a file system directory path as a `Set`
From the command line
```shell
npm start -- --path '~/Documents'
```
Or with the default export
```javascript
import watchCache from '@sequencemedia/watch-cache'
const path = '~/Documents'
watchCache(path)
```
You can confirm whether a file path exists in that directory with `has`
```javascript
import { has } from '@sequencemedia/watch-cache'
```
Or get a _duplicate_ of the current `Set` with `getCache`
```javascript
import { getCache } from '@sequencemedia/watch-cache'
```