@sentry/utils
Advanced tools
Comparing version 4.0.0-rc.1 to 4.0.0-rc.2
{ | ||
"name": "@sentry/utils", | ||
"version": "4.0.0-rc.1", | ||
"version": "4.0.0-rc.2", | ||
"description": "Utilities for all Sentry JavaScript SDKs", | ||
@@ -16,3 +16,3 @@ "repository": "git://github.com/getsentry/raven-js.git", | ||
"dependencies": { | ||
"@sentry/types": "4.0.0-rc.1" | ||
"@sentry/types": "4.0.0-rc.2" | ||
}, | ||
@@ -19,0 +19,0 @@ "devDependencies": { |
@@ -30,2 +30,9 @@ /** | ||
/** | ||
* Tells whether current environment supports Fetch API natively | ||
* {@link supportsNativeFetch}. | ||
* | ||
* @returns Answer to the given question. | ||
*/ | ||
export declare function supportsNativeFetch(): boolean; | ||
/** | ||
* Tells whether current environment supports sendBeacon API | ||
@@ -38,2 +45,9 @@ * {@link supportsBeacon}. | ||
/** | ||
* Tells whether current environment supports ReportingObserver API | ||
* {@link supportsReportingObserver}. | ||
* | ||
* @returns Answer to the given question. | ||
*/ | ||
export declare function supportsReportingObserver(): boolean; | ||
/** | ||
* Tells whether current environment supports Referrer Policy API | ||
@@ -40,0 +54,0 @@ * {@link supportsReferrerPolicy}. |
@@ -84,2 +84,18 @@ "use strict"; | ||
/** | ||
* Tells whether current environment supports Fetch API natively | ||
* {@link supportsNativeFetch}. | ||
* | ||
* @returns Answer to the given question. | ||
*/ | ||
function supportsNativeFetch() { | ||
if (!supportsFetch()) { | ||
return false; | ||
} | ||
var global = misc_1.getGlobalObject(); | ||
var fetch = global.fetch; | ||
// tslint:disable-next-line:no-unsafe-any | ||
return fetch.toString().indexOf('native') !== -1; | ||
} | ||
exports.supportsNativeFetch = supportsNativeFetch; | ||
/** | ||
* Tells whether current environment supports sendBeacon API | ||
@@ -96,2 +112,12 @@ * {@link supportsBeacon}. | ||
/** | ||
* Tells whether current environment supports ReportingObserver API | ||
* {@link supportsReportingObserver}. | ||
* | ||
* @returns Answer to the given question. | ||
*/ | ||
function supportsReportingObserver() { | ||
return 'ReportingObserver' in misc_1.getGlobalObject(); | ||
} | ||
exports.supportsReportingObserver = supportsReportingObserver; | ||
/** | ||
* Tells whether current environment supports Referrer Policy API | ||
@@ -98,0 +124,0 @@ * {@link supportsReferrerPolicy}. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102267
1456
1
+ Added@sentry/types@4.0.0-rc.2(transitive)
- Removed@sentry/types@4.0.0-rc.1(transitive)
Updated@sentry/types@4.0.0-rc.2