https://github.com/wmfs/cardscript-extract-defaults
https://github.com/wmfs/cardscript-extract-defaults
cardscript tymly
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wmfs/cardscript-extract-defaults
- Owner: wmfs
- License: mit
- Created: 2019-01-18T08:32:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-02T00:53:58.000Z (23 days ago)
- Last Synced: 2025-05-02T01:34:10.117Z (23 days ago)
- Topics: cardscript, tymly
- Language: JavaScript
- Size: 347 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cardscript-extract-defaults
[](https://tymly.io/)
[](https://circleci.com/gh/wmfs/cardscript-extract-defaults)
[](https://www.npmjs.com/package/@wmfs/cardscript-extract-defaults)
[](https://codecov.io/gh/wmfs/cardscript-extract-defaults)
[](https://www.codefactor.io/repository/github/wmfs/cardscript-extract-defaults)
[](https://dependabot.com/)
[](http://commitizen.github.io/cz-cli/)
[](https://standardjs.com)
[](https://github.com/wmfs/tymly/blob/master/packages/concrete-paths/LICENSE)> Extracts sensible defaults from some Cardscript.
## Install
```bash
$ npm install cardscript-extract-defaults --save
``````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"
}
)```
```bash
$ npm test
```## License
[MIT](https://github.com/wmfs/cardscript/blob/master/LICENSE)