@wmfs/cardscript-extract-defaults
v1.47.0
Published
Extracts sensible defaults from some Cardscript.
Downloads
680
Readme
cardscript-extract-defaults
Extracts sensible defaults from some Cardscript.
Install
$ npm install cardscript-extract-defaults --save
Usage
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"
}
)
Testing
$ npm test