# dreamtime

> Causality violation for JavaScript. Executing programs before functions are written (think cucumber in js)

Latest version **1.58.0** (published 2025-08-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install dreamtime
pnpm add dreamtime
yarn add dreamtime
bun add dreamtime
```

Provides the command `dreamtime`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.58.0 |
| Published | 2025-08-20 |
| First published | 2019-06-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 81.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | fantasyui.com |
| Maintainers | fantasyui.com |

## Links

- npm: https://www.npmjs.com/package/dreamtime
- Repository: https://github.com/fantasyui-com/dreamtime
- Homepage: https://github.com/fantasyui-com/dreamtime#readme
- Issues: https://github.com/fantasyui-com/dreamtime/issues
- npm.io page: https://npm.io/package/dreamtime

## Dependencies (10)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [stopword](https://npm.io/package/stopword.md) ^0.3.2
- [tosource](https://npm.io/package/tosource.md) ^1.0.0
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [pluralize](https://npm.io/package/pluralize.md) ^8.0.0
- [kebab-case](https://npm.io/package/kebab-case.md) ^1.0.0
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.7.5
- [package-info](https://npm.io/package/package-info.md) ^5.0.1
- [ensure-module](https://npm.io/package/ensure-module.md) ^1.11.0

## Recent versions

- 1.58.0 (latest) — 2025-08-20
- 1.57.0 — 2025-07-19
- 1.56.0 — 2025-05-05
- 1.55.0 — 2025-04-04
- 1.54.0 — 2025-03-24
- 1.53.0 — 2025-02-01
- 1.52.0 — 2025-01-19
- 1.51.0 — 2024-12-26
- 1.50.0 — 2024-05-03
- 1.49.0 — 2024-02-16
- 1.48.0 — 2024-01-27
- 1.47.0 — 2024-01-05
- 1.46.0 — 2023-11-08
- 1.45.0 — 2023-11-05
- 1.44.0 — 2023-10-18
- … 42 more at https://npm.io/package/dreamtime/versions

## README

# dreamtime
Causality violation for JavaScript. Executing programs before functions are written (think cucumber in js)

# Dreamtime Functions

## PROCEDURE: First Order Functions

First order functions describe a procedure completed by second order functions.
- specify order of operations
- it feels like they exist to debug flow control

## TASK: Second Order Functions

Second order functions follow good conventions for managing fulfillment of the task they are charged with.
- There is a single new Promise instance here and heavy reliance on async functions

## UTILITY: Third Order Functions

Third order functions do the dirty work, they don't even receive arguments in an object, they get a standard comma separated deal with it set.
  - get simple arguments (ex: function(url, timeout){ /* dirty work */ })

## Todo

- if module directory changes update the package.json name field

## References

https://github.com/fantasyui-com/tarnation

## Example

```JavaScript
const dreamtime = require('dreamtime');

const program = dreamtime()

  .downloadHtml('http://trackthis.link')
  .htmlQuery('head > script[url]')
  .downloadUrls()
  .extractObjects('ObjectExpression')

console.log(program)
```

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