Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wmfs/cardscript-cleaner

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wmfs/cardscript-cleaner

Cleans Cardscript form data to ensure we only submit the data that we should.

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

cardscript-expressions

Tymly Cardscript CircleCI npm (scoped) codecov CodeFactor Dependabot badge Commitizen friendly JavaScript Style Guide license

cardscript-expressions provides a number of utilities to generate expressions, generate AST's, and clean cardscript data for submissions

Install

$ npm install cardscript-expressions --save

Usage

const expressions = new CardscriptExpressionsxpressions()
Method summary
UsageDescription
const expressionList = getExpressionsFromCardscript(cardscript)Takes a cardscript schema and extracts a list of expressions.
convertExpressionsToAst(expressions)Takes a list of expressions generated by getExpressionsFromCardscript() and amends the generated AST's to an object asts available from expressions.asts
addCardscript(cardscript)A combination of getExpressionsFromCardscript(cardscript) and convertExpressionsToAst(expressions), used to generate AST's from cardscript in one function call
const visibilityList = calculateWidgetVisibility(cardscript, data, asts)Takes a cardscript schema, submission data, and a list of AST's to generate an object of {key: boolean} values representing whether a widget should be visible or not
const clean = cleanData(data, visibilityList)Takes submission data and a visibility list generated by calculateWidgetVisibility and returns a cleaned data object with values of hidden fields removed

License

MIT

Keywords

FAQs

Package last updated on 02 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc