Content
View differences
Updated by Alexander Coles 12 days ago
## Scope
Bucket B of [#65621](https://community.openproject.org/work_packages/65621). Replace lodash null / empty / type predicates with native expressions.
## Call sites (~72)
`isNil` 18 · `isNaN` 15 · `compact` 10 · `defaultTo` 8 · `isEmpty` 8 · `castArray` 7 · `isObject` 5 · `reject` 1
## Strategy
`isNil` → `== null`; `defaultTo` → `??`; `compact` → `filter(Boolean)`; `isNaN` → `Number.isNaN`; `castArray` → `Array.isArray(x) ? x : [x]`; `isObject` → `typeof x === 'object' && x !== null`; `reject` → `filter(x => !pred(x))`; `isEmpty` per-call (string / array / object semantics differ).
## Branch
`code-maintenance/OP-19543-remove-lodash-null-empty` off `dev`.
Bucket B of [#65621](https://community.openproject.org/work_packages/65621). Replace lodash null / empty / type predicates with native expressions.
## Call sites (~72)
`isNil` 18 · `isNaN` 15 · `compact` 10 · `defaultTo` 8 · `isEmpty` 8 · `castArray` 7 · `isObject` 5 · `reject` 1
## Strategy
`isNil` → `== null`; `defaultTo` → `??`; `compact` → `filter(Boolean)`; `isNaN` → `Number.isNaN`; `castArray` → `Array.isArray(x) ? x : [x]`; `isObject` → `typeof x === 'object' && x !== null`; `reject` → `filter(x => !pred(x))`; `isEmpty` per-call (string / array / object semantics differ).
## Branch
`code-maintenance/OP-19543-remove-lodash-null-empty` off `dev`.