# @wmfs/cardscript-schema

> Contains a JSON Schema for Cardscript, along with a validation utility.

Latest version **1.39.0** (published 2026-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wmfs/cardscript-schema
pnpm add @wmfs/cardscript-schema
yarn add @wmfs/cardscript-schema
bun add @wmfs/cardscript-schema
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.39.0 |
| Published | 2026-10-30 |
| First published | 2019-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 144.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | West Midlands Fire Service |
| Maintainers | wmfsbot |
| Keywords | tymly, cardscript |

## Links

- npm: https://www.npmjs.com/package/@wmfs/cardscript-schema
- Repository: https://github.com/wmfs/cardscript-schema
- Homepage: https://github.com/wmfs/cardscript-schema#readme
- Issues: https://github.com/wmfs/cardscript-schema/issues
- npm.io page: https://npm.io/package/@wmfs/cardscript-schema

## Dependencies (4)

- [dottie](https://npm.io/package/dottie.md) 2.0.7
- [lodash](https://npm.io/package/lodash.md) 4.18.1
- [jsonfile](https://npm.io/package/jsonfile.md) 6.2.1
- [jsonschema](https://npm.io/package/jsonschema.md) 1.4.1

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 1.39.0 (latest) — 2026-10-30
- 1.38.1 — 2026-08-14
- 1.38.0 — 2025-10-21
- 1.37.0 — 2025-02-04
- 1.36.0 — 2025-01-08
- 1.35.0 — 2023-06-29
- 1.34.0 — 2023-06-20
- 1.33.0 — 2023-03-13
- 1.32.0 — 2022-07-06
- 1.31.0 — 2022-01-24
- 1.30.0 — 2021-06-07
- 1.29.1 — 2021-05-24
- 1.29.0 — 2021-05-24
- 1.28.0 — 2021-05-13
- 1.27.0 — 2021-02-24
- … 29 more at https://npm.io/package/@wmfs/cardscript-schema/versions

## README

# cardscript-schema

[![Tymly Cardscript](https://img.shields.io/badge/tymly-cardscript-blue.svg)](https://tymly.io/)
[![CircleCI](https://circleci.com/gh/wmfs/cardscript-schema.svg?style=svg)](https://circleci.com/gh/wmfs/cardscript-schema)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/cardscript-schema.svg)](https://www.npmjs.com/package/@wmfs/cardscript-schema) 
[![codecov](https://codecov.io/gh/wmfs/cardscript-schema/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/cardscript-schema) 
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/cardscript-schema/badge)](https://www.codefactor.io/repository/github/wmfs/cardscript-schema) 
[![Dependabot badge](https://img.shields.io/badge/Dependabot-active-brightgreen.svg)](https://dependabot.com/) 
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) 
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) 
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmfs/tymly/blob/master/packages/concrete-paths/LICENSE)

> Contains a JSON Schema for Cardscript, along with a validation utility.

## <a name="install"></a>Install
```bash
$ npm install cardscript-schema --save
```

## <a name="usage"></a>Usage

```javascript
const cardscriptSchema = require('@wmfs/cardscript-schema')

const result = cardscriptSchema.validateForm(
  {
    "type": "AdaptiveCard",
    "body": [
      {
        "type": "TextBlock",
        "text": "Change me!",
        "color": "attention",
        "horizontalAlignment": "center"
      }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
  }
)

if (result.elementsValid) {
  // All is well!!
} else {
  // Do something with result.errors array.
}

```

## <a name="test"></a>Testing

```bash
$ npm test
```

## <a name="license"></a>License
[MIT](https://github.com/wmfs/cardscript/blob/master/LICENSE)

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