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

@sentry/utils

Package Overview
Dependencies
Maintainers
8
Versions
521
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/utils - npm Package Compare versions

Comparing version 4.0.6 to 4.1.0

8

is.d.ts

@@ -81,1 +81,9 @@ /**

export declare function isRegExp(wat: any): boolean;
/**
* Checks whether given value's type is a NaN
* {@link isNaN}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export declare function isNaN(wat: any): boolean;

@@ -122,2 +122,13 @@ "use strict";

exports.isRegExp = isRegExp;
/**
* Checks whether given value's type is a NaN
* {@link isNaN}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isNaN(wat) {
return wat !== wat;
}
exports.isNaN = isNaN;
//# sourceMappingURL=is.js.map
/// <reference types="node" />
import { SentryEvent } from '@sentry/types';
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
export declare function isNodeEnv(): boolean;
/**
* Safely get global scope object

@@ -5,0 +11,0 @@ *

18

misc.js

@@ -5,2 +5,12 @@ "use strict";

/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
function isNodeEnv() {
// tslint:disable:strict-type-predicates
return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';
}
exports.isNodeEnv = isNodeEnv;
/**
* Safely get global scope object

@@ -12,9 +22,3 @@ *

function getGlobalObject() {
return typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: typeof self !== 'undefined'
? self
: {};
return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {};
}

@@ -21,0 +25,0 @@ exports.getGlobalObject = getGlobalObject;

@@ -62,1 +62,3 @@ /**

export declare function serializeKeysToEventMessage(keys: string[], maxLength?: number): string;
/** JSDoc */
export declare function assign(target: any, ...args: any[]): object;
"use strict";
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -44,4 +54,3 @@ var is_1 = require("./is");

// NaN and undefined are not JSON.parseable, but we want to preserve this information
// tslint:disable-next-line:no-unsafe-any
if (Number.isNaN(value)) {
if (is_1.isNaN(value)) {
currentValue = NAN_VALUE;

@@ -136,3 +145,3 @@ }

function fill(source, name, replacement) {
if (!(name in source)) {
if (!(name in source) || source[name].__sentry__) {
return;

@@ -187,3 +196,3 @@ }

}
else if (Number.isNaN(value)) {
else if (is_1.isNaN(value)) {
// NaN and undefined are not JSON.parseable, but we want to preserve this information

@@ -262,2 +271,36 @@ return '[NaN]';

exports.serializeKeysToEventMessage = serializeKeysToEventMessage;
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
/** JSDoc */
function assign(target) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
var e_1, _a;
if (target === null || target === undefined) {
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
try {
for (var args_1 = __values(args), args_1_1 = args_1.next(); !args_1_1.done; args_1_1 = args_1.next()) {
var source = args_1_1.value;
if (source !== null) {
for (var nextKey in source) {
if (Object.prototype.hasOwnProperty.call(source, nextKey)) {
to[nextKey] = source[nextKey];
}
}
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (args_1_1 && !args_1_1.done && (_a = args_1.return)) _a.call(args_1);
}
finally { if (e_1) throw e_1.error; }
}
return to;
}
exports.assign = assign;
//# sourceMappingURL=object.js.map
{
"name": "@sentry/utils",
"version": "4.0.6",
"version": "4.1.0",
"description": "Utilities for all Sentry JavaScript SDKs",

@@ -16,3 +16,3 @@ "repository": "git://github.com/getsentry/raven-js.git",

"dependencies": {
"@sentry/types": "4.0.6"
"@sentry/types": "4.1.0"
},

@@ -31,3 +31,3 @@ "devDependencies": {

"build": "run-s clean; tsc -p tsconfig.build.json",
"build:watch": "run-s clean; tsc -p tsconfig.build.json -w --preserveWatchOutput",
"build:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
"clean": "rimraf dist coverage *.js *.js.map *.d.ts",

@@ -34,0 +34,0 @@ "lint": "run-s lint:prettier lint:tslint",

@@ -25,1 +25,9 @@ /**

export declare function safeJoin(input: any[], delimiter?: string): string;
/**
* Checks if given value is included in the target
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill
* @param target source string
* @param search string to be looked for
* @returns An answer
*/
export declare function includes(target: string, search: string): boolean;

@@ -100,2 +100,18 @@ "use strict";

exports.safeJoin = safeJoin;
/**
* Checks if given value is included in the target
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill
* @param target source string
* @param search string to be looked for
* @returns An answer
*/
function includes(target, search) {
if (search.length > target.length) {
return false;
}
else {
return target.indexOf(search) !== -1;
}
}
exports.includes = includes;
//# sourceMappingURL=string.js.map

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