https://github.com/wmfs/cardscript-schema
https://github.com/wmfs/cardscript-schema
cardscript tymly
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wmfs/cardscript-schema
- Owner: wmfs
- License: mit
- Created: 2019-01-18T08:37:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-02T01:16:46.000Z (23 days ago)
- Last Synced: 2025-05-02T02:28:05.180Z (23 days ago)
- Topics: cardscript, tymly
- Language: JavaScript
- Size: 251 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cardscript-schema
[](https://tymly.io/)
[](https://circleci.com/gh/wmfs/cardscript-schema)
[](https://www.npmjs.com/package/@wmfs/cardscript-schema)
[](https://codecov.io/gh/wmfs/cardscript-schema)
[](https://www.codefactor.io/repository/github/wmfs/cardscript-schema)
[](https://dependabot.com/)
[](http://commitizen.github.io/cz-cli/)
[](https://standardjs.com)
[](https://github.com/wmfs/tymly/blob/master/packages/concrete-paths/LICENSE)> Contains a JSON Schema for Cardscript, along with a validation utility.
## Install
```bash
$ npm install cardscript-schema --save
``````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.
}```
```bash
$ npm test
```## License
[MIT](https://github.com/wmfs/cardscript/blob/master/LICENSE)