# @hoast/source-javascript

> Read and execute scripts from the filesystem.

Latest version **3.2.0** (published 2024-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hoast/source-javascript
pnpm add @hoast/source-javascript
yarn add @hoast/source-javascript
bun add @hoast/source-javascript
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2024-02-11 |
| First published | 2021-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ron Dekker |
| Maintainers | redkenrok |
| Keywords | hoast, source, scripts, javascript, filesystem |

## Links

- npm: https://www.npmjs.com/package/@hoast/source-javascript
- Repository: https://github.com/hoast/hoast
- Homepage: https://github.com/hoast/hoast/tree/main/packages/source-javascript#readme
- Issues: https://github.com/hoast/hoast/issues
- npm.io page: https://npm.io/package/@hoast/source-javascript

## Dependencies (5)

- [planckmatch](https://npm.io/package/planckmatch.md) ^0.2.1
- [@hoast/utils](https://npm.io/package/@hoast/utils.md) ^3.2.0
- [detective-cjs](https://npm.io/package/detective-cjs.md) ^4.1.0
- [detective-es6](https://npm.io/package/detective-es6.md) ^3.0.1
- [@hoast/base-source](https://npm.io/package/@hoast/base-source.md) ^3.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 3.2.0 (latest) — 2024-02-11
- 3.0.1 — 2022-05-30
- 3.0.0 — 2021-05-23

## README

# Source Javascript

Read and execute scripts from the filesystem.

## Install

```ZSH
npm install @hoast/source-javascript
```

## Options

- `{String} directory = 'src'` Directory path, either absolute or relative to the working directory.
- `{String} executeProperty = 'default'` Dot notation of property on imported object to execute.
- `{Array} filterPatterns = null` Glob patterns used to filter the file paths relative to the set directory with.
- `{Object} filterOptions` Pattern matching options.
  - `{Boolean} all = false` Whether all patterns have to match, or any match is sufficient.
  - `{Boolean} extended = false` Enable all advanced features from extglob.
  - `{String} flags = ''` RegExp flags (e.g. 'i' ) to pass to the RegExp constructor.
  - `{Boolean} globstar = false` If false the pattern 'path/*' will match any string beginning with 'path/', for example it will match 'path/file.txt' and 'path/to/file.txt'. If true the same 'path/*' will match any string beginning with 'path/' that does not have a '/' to the right of it, for example it will match 'path/file.txt' but not 'path/to/file.txt'. If true the pattern 'path/**' will match any string beginning with 'path/', which is equal to the 'path/*' with globstar set to false.
  - `{Boolean} strict = false` Be forgiving about multiple slashes, such as /// and make everything after the first / optional. Like how bash glob works.
- `{Array<String>} watchIgnore = [ '**/node_modules/**' ]` Paths of files to ignore marking as dependencies when watching for changes.

- `{Number} logLevel = 2` Log level given to the [logger](https://github.com/hoast/hoast/tree/main/packages/utils#logger.js).

---
_Source: https://npm.io/package/@hoast/source-javascript · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
