15 lines
431 B
JavaScript
15 lines
431 B
JavaScript
import { memoize } from './Schemable';
|
|
// -------------------------------------------------------------------------------------
|
|
// constructors
|
|
// -------------------------------------------------------------------------------------
|
|
/**
|
|
* @category constructors
|
|
* @since 2.2.0
|
|
*/
|
|
export function make(schema) {
|
|
return memoize(schema);
|
|
}
|
|
export function interpreter(S) {
|
|
return function (schema) { return schema(S); };
|
|
}
|