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

@getstanza/core

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getstanza/core - npm Package Compare versions

Comparing version 0.0.4-beta to 0.0.5-beta

src/withStanzaHeaders.d.ts

23

index.js

@@ -329,2 +329,23 @@ /******************************************************************************

const BAGGAGE_HEADER = 'baggage';
const FEATURE_BAGGAGE_KEY = 'stz-feat';
function withStanzaHeaders({
feature
}, headers) {
// @ts-expect-error: if we don't pass initial headers we return Record<string, string> object
let initHeaders = headers !== null && headers !== void 0 ? headers : {};
const baggageValue = `${FEATURE_BAGGAGE_KEY}=${feature}`;
if (initHeaders instanceof Headers) {
initHeaders = new Headers(initHeaders);
initHeaders.append(BAGGAGE_HEADER, baggageValue);
} else if (Array.isArray(initHeaders)) {
initHeaders = initHeaders.map(h => [...h]);
initHeaders.push([BAGGAGE_HEADER, baggageValue]);
} else {
initHeaders = Object.assign({}, initHeaders);
initHeaders[BAGGAGE_HEADER] = baggageValue;
}
return initHeaders;
}
const utils = {

@@ -342,2 +363,2 @@ globals

export { Stanza, StanzaChangeTarget, Stanza as default, groupBy, identity, utils };
export { Stanza, StanzaChangeTarget, Stanza as default, groupBy, identity, utils, withStanzaHeaders };

2

package.json
{
"name": "@getstanza/core",
"version": "0.0.4-beta",
"version": "0.0.5-beta",
"type": "module",

@@ -5,0 +5,0 @@ "description": "Stanza core JS features",

@@ -6,2 +6,3 @@ import { getFeatureStates } from './getFeatureStates';

export * from './eventEmitter';
export * from './withStanzaHeaders';
export type { FeatureState } from './models/featureState';

@@ -8,0 +9,0 @@ export type { LocalStateProvider } from './models/localStateProvider';

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