UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

13 lines (12 loc) 338 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.predicateOpWrapper = void 0; const predicateOpWrapper = (fn) => { return (doc) => { const test = fn(doc); if (!test) throw new Error('TEST'); return doc; }; }; exports.predicateOpWrapper = predicateOpWrapper;