Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@semantic-ui/reactivity

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semantic-ui/reactivity - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

4

package.json
{
"name": "@semantic-ui/reactivity",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",

@@ -10,3 +10,3 @@ "main": "src/index.js",

"dependencies": {
"@semantic-ui/utils": "^0.0.10"
"@semantic-ui/utils": "^0.0.11"
},

@@ -13,0 +13,0 @@ "devDependencies": {

@@ -8,3 +8,3 @@ import { clone, isObject, isEqual, wrapFunction, findIndex, unique, isNumber } from '@semantic-ui/utils';

constructor(initialValue, equalityFunction) {
this.currentValue = clone(initialValue);
this.currentValue = this.clone(initialValue);
this.dependency = new Dependency();

@@ -25,3 +25,3 @@ this.equalityFunction = equalityFunction

return (Array.isArray(value) || typeof value == 'object')
? clone(value)
? this.clone(value)
: value

@@ -31,5 +31,14 @@ ;

clone(value) {
if (value instanceof ReactiveVar) {
const clonedInstance = new ReactiveVar(value.currentValue, value.equalityFunction);
clonedInstance.dependency = value.dependency;
return clonedInstance;
}
return clone(value);
}
set value(newValue) {
if (!this.equalityFunction(this.currentValue, newValue)) {
this.currentValue = clone(newValue);
this.currentValue = this.clone(newValue);
this.dependency.changed({ value: newValue, trace: new Error().stack}); // Pass context

@@ -98,3 +107,3 @@ }

}
const newValue = clone(this.currentValue).map((object, currentIndex) => {
const newValue = this.clone(this.currentValue).map((object, currentIndex) => {
if(index == 'all' || currentIndex == index) {

@@ -109,7 +118,7 @@ object[property] = value;

changeItems(mapFunction) {
const newValue = clone(this.currentValue).map(mapFunction);
const newValue = this.clone(this.currentValue).map(mapFunction);
this.set(newValue);
}
removeItems(filterFunction) {
const newValue = clone(this.currentValue).filter((value) => !filterFunction(value));
const newValue = this.clone(this.currentValue).filter((value) => !filterFunction(value));
this.set(newValue);

@@ -116,0 +125,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc