UNPKG

@conform-to/dom

Version:

A set of opinionated helpers built on top of the Constraint Validation API

20 lines (16 loc) 426 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function invariant(expectedCondition, message) { if (!expectedCondition) { throw new Error(message); } } function generateId() { return (Date.now() * Math.random()).toString(36); } function clone(data) { return JSON.parse(JSON.stringify(data)); } exports.clone = clone; exports.generateId = generateId; exports.invariant = invariant;