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

deep-state-observer

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-state-observer - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

9

index.cjs.js

@@ -1351,7 +1351,8 @@ 'use strict';

const wildcardToRegex$1 = wildcard.wildcardToRegex;
const defaultOptions = { delimeter: '.', recursiveString: '...' };
class DeepStore {
constructor(data = {}, options = { delimeter: '.', recursiveWatchString: '...' }) {
constructor(data = {}, options = defaultOptions) {
this.listeners = {};
this.data = data;
this.options = options;
this.options = Object.assign({}, defaultOptions, options);
}

@@ -1384,6 +1385,6 @@ getListeners() {

isRecursive(path) {
return path.endsWith(this.options.recursiveWatchString);
return path.endsWith(this.options.recursiveString);
}
getRecursive(path) {
return path.slice(0, -this.options.recursiveWatchString.length);
return path.slice(0, -this.options.recursiveString.length);
}

@@ -1390,0 +1391,0 @@ recursiveMatch(currentPath, userPath) {

@@ -1347,7 +1347,8 @@ function _isPlaceholder(a) {

const wildcardToRegex$1 = wildcard.wildcardToRegex;
const defaultOptions = { delimeter: '.', recursiveString: '...' };
class DeepStore {
constructor(data = {}, options = { delimeter: '.', recursiveWatchString: '...' }) {
constructor(data = {}, options = defaultOptions) {
this.listeners = {};
this.data = data;
this.options = options;
this.options = Object.assign({}, defaultOptions, options);
}

@@ -1380,6 +1381,6 @@ getListeners() {

isRecursive(path) {
return path.endsWith(this.options.recursiveWatchString);
return path.endsWith(this.options.recursiveString);
}
getRecursive(path) {
return path.slice(0, -this.options.recursiveWatchString.length);
return path.slice(0, -this.options.recursiveString.length);
}

@@ -1386,0 +1387,0 @@ recursiveMatch(currentPath, userPath) {

@@ -18,2 +18,4 @@ import { path, set, view, lensPath } from 'ramda';

const defaultOptions = { delimeter: '.', recursiveString: '...' };
export default class DeepStore {

@@ -24,6 +26,6 @@ listeners: IListeners;

constructor(data = {}, options = { delimeter: '.', recursiveWatchString: '...' }) {
constructor(data = {}, options = defaultOptions) {
this.listeners = {};
this.data = data;
this.options = options;
this.options = { ...defaultOptions, ...options };
}

@@ -62,7 +64,7 @@

isRecursive(path: string): boolean {
return path.endsWith(this.options.recursiveWatchString);
return path.endsWith(this.options.recursiveString);
}
getRecursive(path: string): string {
return path.slice(0, -this.options.recursiveWatchString.length);
return path.slice(0, -this.options.recursiveString.length);
}

@@ -69,0 +71,0 @@

@@ -1353,7 +1353,8 @@ (function (global, factory) {

const wildcardToRegex$1 = wildcard.wildcardToRegex;
const defaultOptions = { delimeter: '.', recursiveString: '...' };
class DeepStore {
constructor(data = {}, options = { delimeter: '.', recursiveWatchString: '...' }) {
constructor(data = {}, options = defaultOptions) {
this.listeners = {};
this.data = data;
this.options = options;
this.options = Object.assign({}, defaultOptions, options);
}

@@ -1386,6 +1387,6 @@ getListeners() {

isRecursive(path) {
return path.endsWith(this.options.recursiveWatchString);
return path.endsWith(this.options.recursiveString);
}
getRecursive(path) {
return path.slice(0, -this.options.recursiveWatchString.length);
return path.slice(0, -this.options.recursiveString.length);
}

@@ -1392,0 +1393,0 @@ recursiveMatch(currentPath, userPath) {

{
"name": "deep-state-observer",
"version": "1.0.10",
"version": "1.0.11",
"description": "Deep state observer is an state management library that will fire listeners only when specified object node (which also can be a wildcard) was changed.",

@@ -5,0 +5,0 @@ "main": "index.cjs.js",

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