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

@sprucelabs/log

Package Overview
Dependencies
Maintainers
9
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sprucelabs/log - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

build-es6/collectors/browser.js

17

build-es6/Log/index.js

@@ -6,2 +6,3 @@ //

const SocketAdapter = require('../adapters/Sockets');
const getTimes = require('../collectors/browser');

@@ -107,2 +108,18 @@ const CLIENT = typeof window !== 'undefined';

collectBrowserMetrics() {
if (typeof window !== 'undefined') {
const stats = getTimes();
this.metric({
type: 'browserPageLoadStats',
event: 'browserPageLoadStats',
path: window.location.pathname,
...stats
});
}
}
times() {
return getTimes();
}
getAdapter() {

@@ -109,0 +126,0 @@ return new HttpAdapter({

23

build/Log/index.js

@@ -9,6 +9,6 @@ "use strict";

var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

@@ -34,2 +34,4 @@

var getTimes = require('../collectors/browser');
var CLIENT = typeof window !== 'undefined';

@@ -131,2 +133,19 @@ var os;

}, {
key: "collectBrowserMetrics",
value: function collectBrowserMetrics() {
if (typeof window !== 'undefined') {
var stats = getTimes();
this.metric((0, _objectSpread2.default)({
type: 'browserPageLoadStats',
event: 'browserPageLoadStats',
path: window.location.pathname
}, stats));
}
}
}, {
key: "times",
value: function times() {
return getTimes();
}
}, {
key: "getAdapter",

@@ -133,0 +152,0 @@ value: function getAdapter() {

@@ -0,1 +1,8 @@

# [1.4.0](https://github.com/sprucelabsai/sprucebot-log/compare/v1.3.1...v1.4.0) (2018-10-23)
### Features
* collect browser page load metrics ([968f86f](https://github.com/sprucelabsai/sprucebot-log/commit/968f86f))
## [1.3.1](https://github.com/sprucelabsai/sprucebot-log/compare/v1.3.0...v1.3.1) (2018-10-22)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "@sprucelabs/log",
"version": "1.3.1",
"version": "1.4.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public",

@@ -6,2 +6,3 @@ // @flow

const SocketAdapter = require('../adapters/Sockets');
const getTimes = require('../collectors/browser');

@@ -107,2 +108,18 @@ const CLIENT = typeof window !== 'undefined';

collectBrowserMetrics() {
if (typeof window !== 'undefined') {
const stats = getTimes();
this.metric({
type: 'browserPageLoadStats',
event: 'browserPageLoadStats',
path: window.location.pathname,
...stats
});
}
}
times() {
return getTimes();
}
getAdapter() {

@@ -109,0 +126,0 @@ return new HttpAdapter({

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