Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stagas/everyday-node
Everyday node utilities.
https://github.com/stagas/everyday-node
Last synced: 14 days ago
JSON representation
Everyday node utilities.
- Host: GitHub
- URL: https://github.com/stagas/everyday-node
- Owner: stagas
- License: mit
- Created: 2022-06-30T22:02:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T15:39:05.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T07:25:58.454Z (3 months ago)
- Language: TypeScript
- Size: 254 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
everyday-nodeEveryday node utilities.
npm i everyday-node
pnpm add everyday-node
yarn add everyday-node
## API
#
CharKey
discoverFileWithSuffixes
(pathname, suffixes) # pathname
string
suffixes
string []
discoverFileWithSuffixes(pathname, suffixes) =>
Promise<undefined | string>
exec
(cmd, args, options) # cmd
string
args
= []
string []
options
= {}
SpawnOptions
exec(cmd, args, options) =>
Promise<unknown>
execCapture
(cmd, opts) # execCaptureSync
(cmd, opts) # exists
(pathname) # pathname
string
exists(pathname) =>
Promise<boolean>
keypress
(msg, cb) keypress(msg, cb) =>
Promise<# ()
() =>
- void
keypressSync
(msg) # msg
string
keypressSync(msg) =>
- string
singleKeypress
(msg) # waitForFileExists
(pathname, timeout) # pathname
string
timeout
= 15000
number
waitForFileExists(pathname, timeout) =>
Promise<undefined | Deferred<void>>
## Credits
- [everyday-utils](https://npmjs.org/package/everyday-utils) by [stagas](https://github.com/stagas) – Everyday utilities
- [get-pty-output](https://npmjs.org/package/get-pty-output) by [CyriacBr](https://github.com/CyriacBr) – Execute an external command with a PTY, from Node
## Contributing
[Fork](https://github.com/stagas/everyday-node/fork) or [edit](https://github.dev/stagas/everyday-node) and submit a PR.
All contributions are welcome!
## License
MIT © 2022 [stagas](https://github.com/stagas)