insert-into-if
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Utils for insert elements in array/object.

Array

[
    ...,
    ...insertIf(condition, element),
    ...,
]

Object

{
...,
...insertIf(condition, {key: value}),
...,
}

Package Sidebar

Install

npm i insert-into-if

Weekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

2.8 kB

Total Files

12

Last publish

Collaborators

  • all-bear