UNPKG

transformation-utils

Version:

A utility library for data transformation, type coercion, and value manipulation

9 lines (7 loc) 168 B
// const coerceToType = {}; export const invertBoolean = (value) => { if (typeof value !== 'boolean') { throw new Error('Invalid type'); } return !value; };