# @wmfs/cardscript-extract-defaults

> Extracts sensible defaults from some Cardscript.

Latest version **1.66.0** (published 2026-11-02) · MIT license · 0 weekly downloads

## Install

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

## 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.66.0 |
| Published | 2026-11-02 |
| First published | 2019-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| 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-extract-defaults
- Repository: https://github.com/wmfs/cardscript-extract-defaults
- Homepage: https://github.com/wmfs/cardscript-extract-defaults#readme
- Issues: https://github.com/wmfs/cardscript-extract-defaults/issues
- npm.io page: https://npm.io/package/@wmfs/cardscript-extract-defaults

## 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.66.0 (latest) — 2026-11-02
- 1.65.0 — 2026-10-30
- 1.64.1 — 2026-08-14
- 1.64.0 — 2025-12-02
- 1.63.0 — 2025-10-21
- 1.62.0 — 2025-07-23
- 1.61.0 — 2025-06-30
- 1.60.0 — 2025-06-30
- 1.59.0 — 2025-05-20
- 1.58.0 — 2025-04-25
- 1.57.0 — 2025-04-22
- 1.56.0 — 2025-04-08
- 1.55.0 — 2025-03-04
- 1.54.0 — 2025-02-10
- 1.53.0 — 2025-01-07
- … 63 more at https://npm.io/package/@wmfs/cardscript-extract-defaults/versions

## README

# cardscript-extract-defaults

[![Tymly Cardscript](https://img.shields.io/badge/tymly-cardscript-blue.svg)](https://tymly.io/)
[![CircleCI](https://circleci.com/gh/wmfs/cardscript-extract-defaults.svg?style=svg)](https://circleci.com/gh/wmfs/cardscript-extract-defaults)
[![npm (scoped)](https://img.shields.io/npm/v/@wmfs/cardscript-extract-defaults.svg)](https://www.npmjs.com/package/@wmfs/cardscript-extract-defaults) 
[![codecov](https://codecov.io/gh/wmfs/cardscript-extract-defaults/branch/master/graph/badge.svg)](https://codecov.io/gh/wmfs/cardscript-extract-defaults) 
[![CodeFactor](https://www.codefactor.io/repository/github/wmfs/cardscript-extract-defaults/badge)](https://www.codefactor.io/repository/github/wmfs/cardscript-extract-defaults) 
[![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)


> Extracts sensible defaults from some Cardscript.

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

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

```javascript
const extractDefaults = require('@wmfs/cardscript-extract-defaults')

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

```

## <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-extract-defaults · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
