JSPM

@cbevins/variant

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32518F
  • License MIT

Variant input filters, input validators, and output decorators

Package Exports

  • @cbevins/variant

Readme

cbevins/variant

A Variable is an object with a unique name, a value, and a reference to a Variant type. The Variant type provides the Variable with:

  • value input text filtering,
  • value input text transformation into the Variant's native storage type,
  • native value validation,
  • native value transformation into other units-of-measure or text representation,
  • decoration of the displayed output value (with units-of-measure or other prefixes or suffixes).

Many Variables may share the same Variant. In fire behavior modeling, for example, many spread rate variables share the FireSpreadRate Variant, which is derived from the Quantity Variant.