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

@unleash/proxy-client-svelte

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unleash/proxy-client-svelte - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

3

dist/useVariant.d.ts
/// <reference types="svelte" />
declare const useVariant: (name: string) => import("svelte/store").Writable<import("unleash-proxy-client").IVariant>;
import type { IVariant } from 'unleash-proxy-client';
declare const useVariant: (name: string) => import("svelte/store").Writable<IVariant>;
export default useVariant;
import { getContext } from 'svelte';
import { writable, get } from 'svelte/store';
import { ContextStateSymbol } from './context.js';
const variantHasChanged = (oldVariant, newVariant) => {
const variantsAreEqual = oldVariant.name === newVariant?.name &&
oldVariant.enabled === newVariant?.enabled &&
oldVariant.feature_enabled === newVariant?.feature_enabled &&
oldVariant.payload?.type === newVariant?.payload?.type &&
oldVariant.payload?.value === newVariant?.payload?.value;
return !variantsAreEqual;
};
const useVariant = (name) => {

@@ -12,3 +20,3 @@ const { getVariant, client } = getContext(ContextStateSymbol);

const currentVariant = get(variantStore);
if (newVariant?.name !== currentVariant.name || newVariant.enabled !== currentVariant.enabled) {
if (variantHasChanged(currentVariant, newVariant)) {
variantStore.set(newVariant);

@@ -15,0 +23,0 @@ }

{
"name": "@unleash/proxy-client-svelte",
"version": "0.2.0",
"version": "0.3.0",
"description": "Svelte interface for working with Unleash",

@@ -53,3 +53,3 @@ "repository": {

"dependencies": {
"unleash-proxy-client": "^2.5.0"
"unleash-proxy-client": "^3.2.0"
},

@@ -56,0 +56,0 @@ "svelte": "./dist/index.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