# caffeine-script-runtime

> Runtime library for CaffeineScript

Latest version **1.14.1** (published 2025-11-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install caffeine-script-runtime
pnpm add caffeine-script-runtime
yarn add caffeine-script-runtime
bun add caffeine-script-runtime
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.14.1 |
| Published | 2025-11-07 |
| First published | 2017-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 80.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Shane Brinkman-Davis Delamore |
| Maintainers | shanebdavis |

## Links

- npm: https://www.npmjs.com/package/caffeine-script-runtime
- Repository: https://github.com/caffeine-suite/caffeine-suite
- Issues: https:/github.com/caffeine-suite/caffeine-suite/issues
- npm.io page: https://npm.io/package/caffeine-script-runtime

## Recent versions

- 1.14.1 (latest) — 2025-11-07
- 1.14.0 — 2020-10-28
- 1.13.8 — 2020-10-23
- 1.13.7 — 2020-09-26
- 1.13.6 — 2020-09-26
- 1.13.5 — 2020-08-29
- 1.13.4 — 2020-08-23
- 1.13.3 — 2019-06-24
- 1.12.0 — 2019-05-03
- 1.10.0 — 2018-09-20
- 1.7.2 — 2018-06-08
- 1.7.1 — 2018-05-04
- 1.6.0 — 2018-05-04
- 1.4.2 — 2018-01-02
- 1.3.1 — 2017-09-18
- … 10 more at https://npm.io/package/caffeine-script-runtime/versions

## README

# caffeine-script-runtime [![Build Status](https://travis-ci.org/shanebdavis/caffeine-script-runtime.svg?branch=master)](https://travis-ci.org/shanebdavis/caffeine-script-runtime)

Runtime module required by [CaffeineScript.com](http://CaffeineScript.com)

### Future?

Operator overloading and ruby-truth support


```
# CaffeineStyle truth (same as Ruby)

returns true if a is anothing other than false, null or undefined
isTrue: isTrue = (a) -> a? && a != false

returns true if a is false, null or undefined
isFalse: isFalse = (a) -> a == false || !a?

gt:     (a, b) -> if typeof a == "number" and typeof b == "number" then a > b else a.gt b
lt:     (a, b) -> if typeof a == "number" and typeof b == "number" then a < b else a.lt b
lte:    (a, b) -> if typeof a == "number" and typeof b == "number" then a <= b else a.lte b
gte:    (a, b) -> if typeof a == "number" and typeof b == "number" then a >= b else a.gte b

add:    (a, b) -> if (typeof  a == "number" and typeof b == "number") || (typeof a == "string" and typeof b == "string") then a + b else a.add b
sub:    (a, b) -> if typeof   a == "number" and typeof b == "number" then a - b else a.sub b
mul:    (a, b) -> if typeof   a == "number" and typeof b == "number" then a * b else a.mul b
div:    (a, b) -> if typeof   a == "number" and typeof b == "number" then a / b else a.div b
```

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