https://github.com/antoniopresto/bun-safe
Run scripts using Bun.js and perhaps install Bun first if necessary.
https://github.com/antoniopresto/bun-safe
Last synced: 3 months ago
JSON representation
Run scripts using Bun.js and perhaps install Bun first if necessary.
- Host: GitHub
- URL: https://github.com/antoniopresto/bun-safe
- Owner: antoniopresto
- Created: 2024-01-18T02:07:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-25T18:19:04.000Z (over 1 year ago)
- Last Synced: 2024-04-27T05:23:09.431Z (about 1 year ago)
- Language: JavaScript
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
> Run scripts using Bun.js and perhaps install Bun first if necessary.
## Usage
```ts
import { bunSafe } from 'bun-safe';
bunSafe('--version') // -> string;
```Options and results:
```ts
type Options = {
encoding?: 'utf8' | 'buffer';
stdio?: 'overlapped' | 'pipe' | 'ignore' | 'inherit';
};type DefaultOptions = { encoding: 'utf8'; stdio: 'inherit' };
type Result = string | Buffer;
```## Command line
After globally installed
```shell
bun-safe --version
```## Global install
```shell
pnpm i -g bun-safe
```## License:
MIT