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

@splitsoftware/splitio-browserjs

Package Overview
Dependencies
Maintainers
6
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splitsoftware/splitio-browserjs - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1-canary.0

4

CHANGES.txt

@@ -0,2 +1,6 @@

0.1.1 (XXX YY, 2021)
- Updated Karma and a transitive dependency with vulnerabilities.
- Updated Javascript-commons dependency to include improvements and fix some log messages typos.
0.1.0 (March 30, 2021)
- Initial public release. Check the official documentation for details: https://help.split.io/hc/en-us/articles/360058730852

3

cjs/platform/getEventSource.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getEventSource() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' && typeof window.EventSource === 'function' ? window.EventSource : undefined;
return typeof EventSource === 'function' ? EventSource : undefined;
}
exports.default = getEventSource;

@@ -5,5 +5,4 @@ "use strict";

function getFetch() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' ? window.fetch : undefined;
return typeof fetch === 'function' ? fetch : undefined;
}
exports.default = getFetch;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
var packageVersion = '0.1.0';
var packageVersion = '0.1.1-canary.0';
/**

@@ -6,0 +6,0 @@ * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.

@@ -6,3 +6,2 @@ "use strict";

var defaults_1 = tslib_1.__importDefault(require("./defaults"));
var runtime_1 = tslib_1.__importDefault(require("./runtime"));
var storageCS_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/storage/storageCS");

@@ -13,3 +12,2 @@ var pluggable_1 = require("@splitsoftware/splitio-commons/cjs/utils/settingsValidation/integrations/pluggable");

defaults: defaults_1.default,
runtime: runtime_1.default,
storage: storageCS_1.validateStorageCS,

@@ -16,0 +14,0 @@ integrations: pluggable_1.validatePluggableIntegrations,

@@ -8,7 +8,13 @@ "use strict";

var index_1 = require("@splitsoftware/splitio-commons/cjs/sdkFactory/index");
function SplitFactory(config) {
var lang_1 = require("@splitsoftware/splitio-commons/cjs/utils/lang");
/**
*
* @param config configuration object used to instantiates the SDK
* @param customModules optional object of SDK modules to overwrite default ones. Use with caution since, unlike `config`, this param is not validated.
*/
function SplitFactory(config, customModules) {
var settings = settings_1.default(config);
var modules = getModulesMinOnline_1.getModules(settings);
return index_1.sdkFactory(modules);
return index_1.sdkFactory(customModules ? lang_1.merge(modules, customModules) : modules);
}
exports.SplitFactory = SplitFactory;
export default function getEventSource() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' && typeof window.EventSource === 'function' ? window.EventSource : undefined;
return typeof EventSource === 'function' ? EventSource : undefined;
}
// It doesn't return a ponyfill if global fetch is not available
export default function getFetch() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' ? window.fetch : undefined;
return typeof fetch === 'function' ? fetch : undefined;
}
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
var packageVersion = '0.1.0';
var packageVersion = '0.1.1-canary.0';
/**

@@ -4,0 +4,0 @@ * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.

import { settingsValidation } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/index';
import defaults from './defaults';
import runtime from './runtime';
import { validateStorageCS } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/storage/storageCS';

@@ -9,3 +8,2 @@ import { validatePluggableIntegrations } from '@splitsoftware/splitio-commons/esm/utils/settingsValidation/integrations/pluggable';

defaults: defaults,
runtime: runtime,
storage: validateStorageCS,

@@ -12,0 +10,0 @@ integrations: validatePluggableIntegrations,

import settingsValidator from './settings';
import { getModules } from './platform/getModulesMinOnline';
import { sdkFactory } from '@splitsoftware/splitio-commons/esm/sdkFactory/index';
export function SplitFactory(config) {
import { merge } from '@splitsoftware/splitio-commons/esm/utils/lang';
/**
*
* @param config configuration object used to instantiates the SDK
* @param customModules optional object of SDK modules to overwrite default ones. Use with caution since, unlike `config`, this param is not validated.
*/
export function SplitFactory(config, customModules) {
var settings = settingsValidator(config);
var modules = getModules(settings);
return sdkFactory(modules);
return sdkFactory(customModules ? merge(modules, customModules) : modules);
}
{
"name": "@splitsoftware/splitio-browserjs",
"version": "0.1.0",
"version": "0.1.1-canary.0",
"description": "Split SDK for Javascript on Browser",

@@ -62,3 +62,3 @@ "main": "cjs/index.js",

"dependencies": {
"@splitsoftware/splitio-commons": "0.1.0",
"@splitsoftware/splitio-commons": "0.1.1-canary.6",
"@types/google.analytics": "0.0.40"

@@ -79,3 +79,3 @@ },

"jest": "^26.6.3",
"karma": "^5.2.3",
"karma": "^6.3.2",
"karma-chrome-launcher": "^3.1.0",

@@ -82,0 +82,0 @@ "karma-rollup-preprocessor": "^7.0.5",

@@ -64,3 +64,3 @@ # Split JavaScript SDK for Browsers

* .NET [Github](https://github.com/splitio/.net-core-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)

@@ -67,0 +67,0 @@ * GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)

export default function getEventSource() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' && typeof window.EventSource === 'function' ? window.EventSource : undefined;
return typeof EventSource === 'function' ? EventSource : undefined;
}

@@ -5,4 +5,3 @@ import { IFetch } from '@splitsoftware/splitio-commons/src/services/types';

export default function getFetch() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' && window.fetch || unfetch as unknown as IFetch;
return typeof fetch === 'function' ? fetch : unfetch as unknown as IFetch;
}
// It doesn't return a ponyfill if global fetch is not available
export default function getFetch() {
// eslint-disable-next-line compat/compat
return typeof window !== 'undefined' ? window.fetch : undefined;
return typeof fetch === 'function' ? fetch : undefined;
}
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/logger/index';
import { LogLevel } from '@splitsoftware/splitio-commons/src/types';
const packageVersion = '0.1.0';
const packageVersion = '0.1.1-canary.0';

@@ -6,0 +6,0 @@ /**

import { settingsValidation } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/index';
import defaults from './defaults';
import runtime from './runtime';
import { validateStorageCS } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/storage/storageCS';

@@ -10,3 +9,2 @@ import { validatePluggableIntegrations } from '@splitsoftware/splitio-commons/src/utils/settingsValidation/integrations/pluggable';

defaults,
runtime,
storage: validateStorageCS,

@@ -13,0 +11,0 @@ integrations: validatePluggableIntegrations,

import settingsValidator from './settings';
import { getModules } from './platform/getModules';
import { sdkFactory } from '@splitsoftware/splitio-commons/src/sdkFactory/index';
import { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory/types';
import { merge } from '@splitsoftware/splitio-commons/src/utils/lang';
export function SplitFactory(config: any) {
/**
*
* @param config configuration object used to instantiates the SDK
* @param customModules optional object of SDK modules to overwrite default ones. Use with caution since, unlike `config`, this param is not validated.
*/
export function SplitFactory(config: any, customModules?: Partial<ISdkFactoryParams>) {
const settings = settingsValidator(config);
const modules = getModules(settings);
return sdkFactory(modules);
return sdkFactory(customModules ? merge(modules, customModules) as ISdkFactoryParams : modules);
}
import settingsValidator from './settings';
import { getModules } from './platform/getModulesMinOnline';
import { sdkFactory } from '@splitsoftware/splitio-commons/src/sdkFactory/index';
import { ISdkFactoryParams } from '@splitsoftware/splitio-commons/src/sdkFactory/types';
import { merge } from '@splitsoftware/splitio-commons/src/utils/lang';
export function SplitFactory(config: any) {
/**
*
* @param config configuration object used to instantiates the SDK
* @param customModules optional object of SDK modules to overwrite default ones. Use with caution since, unlike `config`, this param is not validated.
*/
export function SplitFactory(config: any, customModules?: Partial<ISdkFactoryParams>) {
const settings = settingsValidator(config);
const modules = getModules(settings);
return sdkFactory(modules);
return sdkFactory(customModules ? merge(modules, customModules) as ISdkFactoryParams : modules);
}
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