Lurch Deductive Engine

Global

Members

constant

functionToTool

A useful tool for converting pure validation functions into validation tools (that is, functions with the side effect of writing their results into the target object).

For example, let's say you have a function that can take as input any expression in a simple toy system and return a validation result, either { result:'valid', reason:'...' } or { result:'invalid', reason:'...' }. Call this function on it to produce a validation tool that you can install in this module, and that will write its results into the appropriate attribute of any target on which it is called.

Source

constant

installedTool

This is the corresponding getter function for the installTool() function. Anything installed with that function can later be looked up with this one.

Source

constant

predictableStringify

A JSON stringification that is predictable. The standard JSON.stringify() can produce different outputs unpredictably, because there is no required ordering on the key-value pairs. This one requires keys to be output in increasing string order, so it is predictable.

Source