@semantic-ui/reactivity
Advanced tools
Comparing version 0.0.12 to 0.0.13
{ | ||
"name": "@semantic-ui/reactivity", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"type": "module", | ||
@@ -10,3 +10,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@semantic-ui/utils": "^0.0.12" | ||
"@semantic-ui/utils": "^0.0.13" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -84,2 +84,11 @@ import { clone, isObject, isEqual, wrapFunction, findIndex, unique, isNumber } from '@semantic-ui/utils'; | ||
} | ||
map(mapFunction) { | ||
const newValue = this.map(mapFunction); | ||
this.set(newValue); | ||
} | ||
filter(filterFunction) { | ||
const newValue = this.filter((value) => !filterFunction(value)); | ||
this.set(newValue); | ||
} | ||
setIndex(index, value) { | ||
@@ -116,11 +125,2 @@ let arr = this.value; | ||
changeItems(mapFunction) { | ||
const newValue = this.clone(this.currentValue).map(mapFunction); | ||
this.set(newValue); | ||
} | ||
removeItems(filterFunction) { | ||
const newValue = this.clone(this.currentValue).filter((value) => !filterFunction(value)); | ||
this.set(newValue); | ||
} | ||
toggle() { | ||
@@ -127,0 +127,0 @@ return this.set(!this.value); |
@@ -238,7 +238,7 @@ import { describe, it, expect, vi } from 'vitest'; | ||
it('changeItems should change each item based on a map function', () => { | ||
it('map should change each item based on a map function', () => { | ||
// code here | ||
}); | ||
it('removeItems should remove items based on a filter callback', () => { | ||
it('filter should remove items based on a filter callback', () => { | ||
// code here | ||
@@ -245,0 +245,0 @@ }); |
43748
+ Added@semantic-ui/utils@0.0.13(transitive)
- Removed@semantic-ui/utils@0.0.12(transitive)
Updated@semantic-ui/utils@^0.0.13