Skip to content

Repository files navigation

cardscript-schema

Tymly CardscriptCircleCInpm (scoped)codecovCodeFactorDependabot badgeCommitizen friendlyJavaScript Style Guidelicense

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

Install

$ npm install cardscript-schema --save

Usage

constcardscriptSchema=require('@wmfs/cardscript-schema')constresult=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.}

Testing

$ npm test

License

MIT

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages