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

@realm.io/common

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@realm.io/common - npm Package Compare versions

Comparing version

to
0.1.3

44

dist/bundle.cjs.js

@@ -121,2 +121,45 @@ 'use strict';

////////////////////////////////////////////////////////////////////////////
//
// Copyright 2022 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
// Exports a globalThis which is polyfilled for iOS 11/12
// From https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const check = function (it) {
return it && it.Math == Math && it;
};
// eslint-disable-next-line no-restricted-globals
const safeGlobalThis =
// eslint-disable-next-line no-restricted-globals
check(typeof globalThis == "object" && globalThis) ||
check(typeof window == "object" && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `self`
check(typeof self == "object" && self) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `global`
check(typeof global == "object" && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `this`
return this;
})() ||
Function("return this")();
////////////////////////////////////////////////////////////////////////////
// Exported for unit testing

@@ -143,2 +186,3 @@ const isDevelopmentModeImpl = () => {

exports.isDevelopmentModeImpl = isDevelopmentModeImpl;
exports.safeGlobalThis = safeGlobalThis;
exports.symbols = symbols;

4

dist/bundle.d.ts

@@ -46,2 +46,4 @@ /**

export { deprecationWarning, handleDeprecatedPositionalArgs, symbols_d as symbols };
declare const safeGlobalThis: typeof globalThis;
export { deprecationWarning, handleDeprecatedPositionalArgs, safeGlobalThis, symbols_d as symbols };

@@ -121,2 +121,45 @@ 'use strict';

////////////////////////////////////////////////////////////////////////////
//
// Copyright 2022 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
// Exports a globalThis which is polyfilled for iOS 11/12
// From https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const check = function (it) {
return it && it.Math == Math && it;
};
// eslint-disable-next-line no-restricted-globals
const safeGlobalThis =
// eslint-disable-next-line no-restricted-globals
check(typeof globalThis == "object" && globalThis) ||
check(typeof window == "object" && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `self`
check(typeof self == "object" && self) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `global`
check(typeof global == "object" && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `this`
return this;
})() ||
Function("return this")();
////////////////////////////////////////////////////////////////////////////
// React/React Native set a global __DEV__ variable when running in dev mode

@@ -127,2 +170,3 @@ setIsDevelopmentMode(typeof __DEV__ !== "undefined" && __DEV__);

exports.handleDeprecatedPositionalArgs = handleDeprecatedPositionalArgs;
exports.safeGlobalThis = safeGlobalThis;
exports.symbols = symbols;

@@ -117,5 +117,48 @@ ////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
//
// Copyright 2022 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
// Exports a globalThis which is polyfilled for iOS 11/12
// From https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const check = function (it) {
return it && it.Math == Math && it;
};
// eslint-disable-next-line no-restricted-globals
const safeGlobalThis =
// eslint-disable-next-line no-restricted-globals
check(typeof globalThis == "object" && globalThis) ||
check(typeof window == "object" && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `self`
check(typeof self == "object" && self) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `global`
check(typeof global == "object" && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `this`
return this;
})() ||
Function("return this")();
////////////////////////////////////////////////////////////////////////////
// React/React Native set a global __DEV__ variable when running in dev mode
setIsDevelopmentMode(typeof __DEV__ !== "undefined" && __DEV__);
export { deprecationWarning, handleDeprecatedPositionalArgs, symbols };
export { deprecationWarning, handleDeprecatedPositionalArgs, safeGlobalThis, symbols };

@@ -117,2 +117,45 @@ ////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
//
// Copyright 2022 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
// Exports a globalThis which is polyfilled for iOS 11/12
// From https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const check = function (it) {
return it && it.Math == Math && it;
};
// eslint-disable-next-line no-restricted-globals
const safeGlobalThis =
// eslint-disable-next-line no-restricted-globals
check(typeof globalThis == "object" && globalThis) ||
check(typeof window == "object" && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `self`
check(typeof self == "object" && self) ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `global`
check(typeof global == "object" && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore allow `this`
return this;
})() ||
Function("return this")();
////////////////////////////////////////////////////////////////////////////
// Exported for unit testing

@@ -136,2 +179,2 @@ const isDevelopmentModeImpl = () => {

export { deprecationWarning, handleDeprecatedPositionalArgs, isDevelopmentModeImpl, symbols };
export { deprecationWarning, handleDeprecatedPositionalArgs, isDevelopmentModeImpl, safeGlobalThis, symbols };
{
"name": "@realm.io/common",
"version": "0.1.2",
"version": "0.1.3",
"description": "Cross-product common code used by Realm",

@@ -49,2 +49,1 @@ "main": "./dist/bundle.cjs.js",

}