UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

19 lines (15 loc) 422 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function omitBy(obj, shouldOmit) { const result = {}; const keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { const key = keys[i]; const value = obj[key]; if (!shouldOmit(value, key)) { result[key] = value; } } return result; } exports.omitBy = omitBy;