# @rainbow-o23/n4

> o23 pipeline parser

Latest version **1.0.67** (published 2026-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rainbow-o23/n4
pnpm add @rainbow-o23/n4
yarn add @rainbow-o23/n4
bun add @rainbow-o23/n4
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.67 |
| Published | 2026-05-28 |
| First published | 2024-01-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 159.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Rainbow Team |
| Maintainers | build_admin |

## Links

- npm: https://www.npmjs.com/package/@rainbow-o23/n4
- Repository: https://github.com/InsureMO/rainbow-o23
- Homepage: https://github.com/InsureMO/rainbow-o23#readme
- Issues: https://github.com/InsureMO/rainbow-o23/issues
- npm.io page: https://npm.io/package/@rainbow-o23/n4

## Dependencies (2)

- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.1
- [@rainbow-o23/n3](https://npm.io/package/@rainbow-o23/n3.md) 1.0.67

## Recent versions

- 1.0.67 (latest) — 2026-05-28
- 1.0.58-alpha.3 (alpha) — 2025-04-21
- 1.0.66 — 2026-05-28
- 1.0.65 — 2026-05-15
- 1.0.64 — 2026-05-11
- 1.0.63 — 2026-05-11
- 1.0.62 — 2026-05-10
- 1.0.61 — 2026-04-14
- 1.0.60 — 2025-12-09
- 1.0.59 — 2025-04-22
- 1.0.58 — 2025-04-21
- 1.0.58-alpha.2 — 2025-04-21
- 1.0.57 — 2025-04-02
- 1.0.56 — 2024-12-17
- 1.0.55 — 2024-12-13
- … 59 more at https://npm.io/package/@rainbow-o23/n4/versions

## README

![Static Badge](https://img.shields.io/badge/InsureMO-777AF2.svg)

![Module Formats](https://img.shields.io/badge/module%20formats-cjs-green.svg)

# o23/n4

`o23/n4` provides the ability to read pipeline and pipeline step configurations, currently supporting the YAML format. While reading the
configuration, o23/n4 simplifies the notation of certain properties and also adds some related validation and script parsing supplements, as
follows:

- For single-line snippet, a prefix `return ` will be automatically added to ensure that data can be returned,
- Automatic conversion between camel case and kebab case property names,
- If a property value starts with `env:`, it will be automatically replaced with the corresponding environment variable value,
- The prefix `env:` supports multiple environment variables, separated by commas, with the first one having a value taking precedence.

When writing YAML configurations, the following syntax rules should also be noted:

- `null` string value will be recognized as a `null` value. If you need to return a `null` value, you can write it as `"null"`
  or `return null`,
- Property values that conform to JSON syntax will be automatically parsed. Therefore, if a value needs to be treated as a snippet, it
  should be enclosed in double quotation marks (""). For example, `{name: $factor.name}` can be written as `"{name: $factor.name}"`,
- Sometimes, we don't want the `return ` prefix to be automatically added before a single-line snippet. In this case, we can use the
  vertical line `|` syntax to avoid this problem. For example, consider this:

  ```yaml
  snippet: $factor.enabled = true
  ```

  If it is written in this way, the return value is `true`. We can instead write it as following:

  ```yaml
  snippet: |
    $factor.enabled = true
  ```

You can find all relevant YAML configuration examples in the `server/02-api-test` folder of `o23/n99`. Since the property names are
self-explanatory, we will not explain the purpose of each property in the following section. You can refer to the documentation of `o23/n3`
for this part.

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