New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codescouts/svelte-store

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codescouts/svelte-store - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

lib/src/auto-create.d.ts

5

lib/store.d.ts

@@ -6,7 +6,8 @@ import { StateCreator } from "zustand/vanilla";

};
type Creator<T> = () => T;
type Return<T> = {
build: () => T;
build: () => Creator<T>;
};
export declare const create: <T>(stateCreator: StateCreator<T, [], [], T>) => {
build: () => T;
build: () => Creator<T>;
withPersist: {

@@ -13,0 +14,0 @@ <E>(entityType: string | Newly<E>, factory: Factory): Return<T>;

14

lib/store.js

@@ -8,9 +8,9 @@ "use strict";

var store_extensions_1 = require("./store.extensions");
var zustandToSvelte = function (zustandStore) {
var definedStore = zustandStore.getState();
Object.entries(definedStore).forEach(function (e) {
var key = e[0];
var element = definedStore[key];
var zustandToSvelte = function (store) {
var state = store.getState();
Object.keys(state).forEach(function (_key) {
var key = _key;
var element = state[key];
var withSubscription = (0, store_1.readable)(element, function (set) {
var subscribed = zustandStore.subscribe(function (value) { return set(value[key]); });
var subscribed = store.subscribe(function (value) { return set(value[key]); });
return function () { return subscribed(); };

@@ -20,3 +20,3 @@ });

});
return function () { return definedStore; };
return function () { return state; };
};

@@ -23,0 +23,0 @@ var create = function (stateCreator) {

{
"name": "@codescouts/svelte-store",
"version": "1.0.2",
"version": "1.0.3",
"main": "./lib/index.js",

@@ -11,3 +11,4 @@ "types": "./lib/index.d.ts",

"build": "tsc",
"start": "tsc -w"
"start": "tsc -w",
"test": "jest"
},

@@ -18,3 +19,20 @@ "dependencies": {

"zustand": "^4.3.7"
},
"devDependencies": {
"jest": "^29.5.0",
"ts-jest": "^29.1.0"
},
"jest": {
"roots": [
"src/",
"test"
],
"testMatch": [
"/__tests__/.*\\.(ts|tsx|js)",
"**/?(*.)(spec|test).ts?(x)"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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