@segment/analytics.js-core
Advanced tools
Comparing version 3.13.4-beta.1.0.5 to 3.13.4
@@ -30,3 +30,2 @@ 'use strict'; | ||
var isMeta = require('@segment/is-meta'); | ||
var keys = require('@ndhoule/keys'); | ||
var memory = require('./memory'); | ||
@@ -175,3 +174,3 @@ var nextTick = require('next-tick'); | ||
var readyCallCount = 0; | ||
var integrationCount = keys(integrations).length; | ||
var integrationCount = Object.keys(integrations).length; | ||
var ready = function () { | ||
@@ -504,3 +503,3 @@ readyCallCount++; | ||
// Weird, yeah--moving special props to `context.page` will fix this in the long term. | ||
var overrides = pick(keys(defs), properties); | ||
var overrides = pick(Object.keys(defs), properties); | ||
if (!is.empty(overrides)) { | ||
@@ -810,3 +809,3 @@ options = options || {}; | ||
Analytics.prototype.normalize = function (msg) { | ||
msg = normalize(msg, keys(this._integrations)); | ||
msg = normalize(msg, Object.keys(this._integrations)); | ||
if (msg.anonymousId) | ||
@@ -813,0 +812,0 @@ user.anonymousId(msg.anonymousId); |
'use strict'; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* Module dependencies. | ||
*/ | ||
var bindAll = require('bind-all'); | ||
var clone = require('./utils/clone'); | ||
var cookie = require('@segment/cookie'); | ||
var debug = require('debug')('analytics.js:cookie'); | ||
var defaults = require('@ndhoule/defaults'); | ||
var topDomain = require('@segment/top-domain'); | ||
var bind_all_1 = __importDefault(require("bind-all")); | ||
var clone_1 = __importDefault(require("./utils/clone")); | ||
var cookie_1 = __importDefault(require("@segment/cookie")); | ||
var debug_1 = __importDefault(require("debug")); | ||
var defaults_1 = __importDefault(require("@ndhoule/defaults")); | ||
var top_domain_1 = __importDefault(require("@segment/top-domain")); | ||
// eslint-disable-next-line new-cap | ||
var debug = debug_1.default('analytics.js:cookie'); | ||
/** | ||
@@ -16,14 +23,5 @@ * Initialize a new `Cookie` with `options`. | ||
*/ | ||
function Cookie(options) { | ||
this.options(options); | ||
} | ||
/** | ||
* Get or set the cookie options. | ||
* | ||
* @param {Object} options | ||
* @field {Number} maxage (1 year) | ||
* @field {String} domain | ||
* @field {String} path | ||
* @field {Boolean} secure | ||
*/ | ||
var Cookie = function (options) { | ||
_this.options(options); | ||
}; | ||
Cookie.prototype.options = function (options) { | ||
@@ -33,6 +31,6 @@ if (arguments.length === 0) | ||
options = options || {}; | ||
var domain = '.' + topDomain(window.location.href); | ||
var domain = '.' + top_domain_1.default(window.location.href); | ||
if (domain === '.') | ||
domain = null; | ||
this._options = defaults(options, { | ||
this._options = defaults_1.default(options, { | ||
// default to a year | ||
@@ -68,3 +66,3 @@ maxage: 31536000000, | ||
value = window.JSON.stringify(value); | ||
cookie(key, value === 'null' ? null : value, clone(this._options)); | ||
cookie_1.default(key, value === 'null' ? null : value, clone_1.default(this._options)); | ||
return true; | ||
@@ -84,3 +82,3 @@ } | ||
try { | ||
var value = cookie(key); | ||
var value = cookie_1.default(key); | ||
value = value ? window.JSON.parse(value) : null; | ||
@@ -101,3 +99,3 @@ return value; | ||
try { | ||
cookie(key, null, clone(this._options)); | ||
cookie_1.default(key, null, clone_1.default(this._options)); | ||
return true; | ||
@@ -112,3 +110,3 @@ } | ||
*/ | ||
module.exports = bindAll(new Cookie()); | ||
module.exports = bind_all_1.default(new Cookie()); | ||
/** | ||
@@ -115,0 +113,0 @@ * Expose the `Cookie` constructor. |
'use strict'; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* | ||
* Module dependencies. | ||
*/ | ||
var Entity = require('./entity'); | ||
var bindAll = require('bind-all'); | ||
var debug = require('debug')('analytics:group'); | ||
var inherit = require('inherits'); | ||
var entity_1 = __importDefault(require("./entity")); | ||
var bind_all_1 = __importDefault(require("bind-all")); | ||
var debug_1 = __importDefault(require("debug")); | ||
var inherits_1 = __importDefault(require("inherits")); | ||
// eslint-disable-next-line new-cap | ||
var debug = debug_1.default('analytics.js:group'); | ||
/** | ||
@@ -29,3 +35,3 @@ * Group defaults | ||
this.debug = debug; | ||
Entity.call(this, options); | ||
entity_1.default.call(this, options); | ||
} | ||
@@ -35,7 +41,7 @@ /** | ||
*/ | ||
inherit(Group, Entity); | ||
inherits_1.default(Group, entity_1.default); | ||
/** | ||
* Expose the group singleton. | ||
*/ | ||
module.exports = bindAll(new Group()); | ||
module.exports = bind_all_1.default(new Group()); | ||
/** | ||
@@ -42,0 +48,0 @@ * Expose the `Group` constructor. |
{ | ||
"name": "@segment/analytics.js-core", | ||
"author": "Segment <friends@segment.com>", | ||
"version": "3.13.4-beta.1.0.5", | ||
"version": "3.13.4", | ||
"description": "The hassle-free way to integrate analytics into any web application.", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
240266
49
6387
0
3
1