radashi 12.9.3 → 12.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/radashi.cjs CHANGED
@@ -262,10 +262,10 @@ function replace(array, newItem, match) {
262
262
 
263
263
  // src/array/replaceOrAppend.ts
264
264
  function replaceOrAppend(array, newItem, match) {
265
- if (!array && !newItem) {
265
+ if (!array && newItem == null) {
266
266
  return [];
267
267
  }
268
- if (!newItem) {
268
+ if (newItem == null) {
269
269
  return [...array];
270
270
  }
271
271
  if (!array) {
@@ -469,7 +469,7 @@ declare function replace<T>(array: readonly T[], newItem: T, match: (item: T, id
469
469
  * ```
470
470
  * @version 12.1.0
471
471
  */
472
- declare function replaceOrAppend<T>(array: readonly T[], newItem: T, match: (a: T, idx: number) => boolean): T[];
472
+ declare function replaceOrAppend<T>(array: readonly T[], newItem: T | null | undefined, match: (a: T, idx: number) => boolean): T[];
473
473
 
474
474
  /**
475
475
  * Select performs a filter and a mapper inside of a reduce, only
package/dist/radashi.d.ts CHANGED
@@ -469,7 +469,7 @@ declare function replace<T>(array: readonly T[], newItem: T, match: (item: T, id
469
469
  * ```
470
470
  * @version 12.1.0
471
471
  */
472
- declare function replaceOrAppend<T>(array: readonly T[], newItem: T, match: (a: T, idx: number) => boolean): T[];
472
+ declare function replaceOrAppend<T>(array: readonly T[], newItem: T | null | undefined, match: (a: T, idx: number) => boolean): T[];
473
473
 
474
474
  /**
475
475
  * Select performs a filter and a mapper inside of a reduce, only
package/dist/radashi.js CHANGED
@@ -260,10 +260,10 @@ function replace(array, newItem, match) {
260
260
 
261
261
  // src/array/replaceOrAppend.ts
262
262
  function replaceOrAppend(array, newItem, match) {
263
- if (!array && !newItem) {
263
+ if (!array && newItem == null) {
264
264
  return [];
265
265
  }
266
- if (!newItem) {
266
+ if (newItem == null) {
267
267
  return [...array];
268
268
  }
269
269
  if (!array) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "radashi",
3
- "version": "12.9.3",
3
+ "version": "12.9.4",
4
4
  "type": "module",
5
5
  "description": "The modern, community-first TypeScript toolkit with all of the fast, readable, and minimal utility functions you need. Type-safe, dependency-free, tree-shakeable, fully tested.",
6
6
  "repository": {