Home Reference Source
import Fence from 'fence.js/src/lib/Fence.js'
public class | source

Fence

A 'built' FenceBuilder that can be exported for use in other functions.

Constructor Summary

Public Constructor
public

constructor(invokables: array)

Member Summary

Private Members
private

Method Summary

Public Methods
public

run(subject: any): Result

Iterates over an array of invokables.

Public Constructors

public constructor(invokables: array) source

Params:

NameTypeAttributeDescription
invokables array

Array of invokable functions

Private Members

private _invokables: * source

Public Methods

public run(subject: any): Result source

Iterates over an array of invokables. Each invokable is called with a subject which is the attribute value being validated.

Params:

NameTypeAttributeDescription
subject any

Some value to be validated

Return:

Result

An object representing invoked functions and their outputs