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

nuxt-testevia

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-testevia - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "nuxt-testevia",
"version": "1.0.3",
"version": "1.0.4",
"description": "Nuxt - Testevia Logger",

@@ -5,0 +5,0 @@ "license": "MIT",

import axios from 'axios'
const whichBrowser = () =>{
let test = (regexp) => regexp.test(window.navigator.userAgent);
switch(true){
case test(/edge/i): return "Edge";
case test(/opr/i) && (!!window.opr || !!window.opera): return "Opera";
case test(/chrome/i) && !!window.chrome: return "Chrome";
case test(/trident/i) : return "Internet Explorer";
case test(/firefox/i) : return "Firefox";
case test(/safari/i): return "Safari";
default: return "Other";
}
};
export default {
errorHandler(options){
let self = this;
return async function errorHandlerMiddleware(err, req, res, next) {
await self.sendError(req.url, err, options)
return function errorHandlerMiddleware(err, req, res, next) {
self.sendError(req.url, err, options)
return next(err);

@@ -29,2 +42,6 @@ };

if(process.browser){
context.data['browser'] = whichBrowser();
}
axios.post('https://testevia.broj42.com/api/log-errors/', context, {headers: {'Authorization': options.apiKey}})

@@ -31,0 +48,0 @@ .catch(e =>{

@@ -17,3 +17,2 @@ const path = require('path')

module.exports.meta = require('../package.json')
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