Socket
Socket
Sign inDemoInstall

@sentry/utils

Package Overview
Dependencies
Maintainers
9
Versions
499
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.6.2 to 4.6.3

8

esm/is.d.ts

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

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

@@ -130,2 +130,13 @@ /**

}
/**
* Checks whether given value's type is a SyntheticEvent
* {@link isSyntheticEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
export function isSyntheticEvent(wat) {
// tslint:disable-next-line:no-unsafe-any
return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
}
//# sourceMappingURL=is.js.map

14

esm/object.js

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

import { isArray, isNaN, isPlainObject, isPrimitive, isUndefined } from './is';
import { isArray, isNaN, isPlainObject, isPrimitive, isSyntheticEvent, isUndefined } from './is';
import { Memo } from './memo';

@@ -234,5 +234,2 @@ import { truncate } from './string';

}
if (value instanceof Date) {
return `[Date] ${value}`;
}
if (value instanceof Error) {

@@ -245,2 +242,6 @@ return objectifyError(value);

}
// React's SyntheticEvent thingy
if (isSyntheticEvent(value)) {
return '[SyntheticEvent]';
}
if (isNaN(value)) {

@@ -266,2 +267,7 @@ return '[NaN]';

const copy = isArray(obj) ? obj.slice() : isPlainObject(obj) ? assign({}, obj) : obj;
const normalized = normalizeValue(obj);
// If an object was normalized to its string form, we should just bail out as theres no point in going down that branch
if (typeof normalized === 'string') {
return normalized;
}
if (!isPrimitive(obj)) {

@@ -268,0 +274,0 @@ if (memo.memoize(obj)) {

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

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

@@ -144,2 +144,14 @@ "use strict";

exports.isNaN = isNaN;
/**
* Checks whether given value's type is a SyntheticEvent
* {@link isSyntheticEvent}.
*
* @param wat A value to be checked.
* @returns A boolean representing the result.
*/
function isSyntheticEvent(wat) {
// tslint:disable-next-line:no-unsafe-any
return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
}
exports.isSyntheticEvent = isSyntheticEvent;
//# sourceMappingURL=is.js.map

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

}
if (value instanceof Date) {
return "[Date] " + value;
}
if (value instanceof Error) {

@@ -263,2 +260,6 @@ return objectifyError(value);

}
// React's SyntheticEvent thingy
if (is_1.isSyntheticEvent(value)) {
return '[SyntheticEvent]';
}
if (is_1.isNaN(value)) {

@@ -285,2 +286,7 @@ return '[NaN]';

var copy = is_1.isArray(obj) ? obj.slice() : is_1.isPlainObject(obj) ? assign({}, obj) : obj;
var normalized = normalizeValue(obj);
// If an object was normalized to its string form, we should just bail out as theres no point in going down that branch
if (typeof normalized === 'string') {
return normalized;
}
if (!is_1.isPrimitive(obj)) {

@@ -287,0 +293,0 @@ if (memo.memoize(obj)) {

{
"name": "@sentry/utils",
"version": "4.6.2",
"version": "4.6.3",
"description": "Utilities for all Sentry JavaScript SDKs",

@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

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