@segment/analytics.js-core
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -39,3 +39,3 @@ 'use strict'; | ||
var prevent = require('@segment/prevent-default'); | ||
var qs = require('query-string'); | ||
var querystring = require('component-querystring'); | ||
var store = require('./store'); | ||
@@ -727,3 +727,3 @@ var user = require('./user'); | ||
// Parse querystring to an object | ||
var q = qs.parse(query); | ||
var q = querystring.parse(query); | ||
// Create traits and properties objects, populate from querysting params | ||
@@ -747,12 +747,12 @@ var traits = pickPrefix('ajs_trait_', q); | ||
*/ | ||
function pickPrefix(prefix, queryString) { | ||
function pickPrefix(prefix, object) { | ||
var length = prefix.length; | ||
var sub; | ||
return Object.keys(queryString).reduce(function (acc, key) { | ||
return foldl(function (acc, val, key) { | ||
if (key.substr(0, length) === prefix) { | ||
sub = key.substr(length); | ||
acc[sub] = queryString[key]; | ||
acc[sub] = val; | ||
} | ||
return acc; | ||
}, {}); | ||
}, {}, object); | ||
} | ||
@@ -759,0 +759,0 @@ }; |
@@ -33,2 +33,2 @@ export = each; | ||
*/ | ||
declare function each(iterator: any, collection: Array | any | string): undefined; | ||
declare function each(iterator: any, collection: any[] | any | string): undefined; |
@@ -0,1 +1,5 @@ | ||
# 4.0.1 / 2020-08-21 | ||
- Minor version bump since previous version was published incorrectly. No code change. | ||
# 4.0.0 / 2020-08-20 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "@segment/analytics.js-core", | ||
"author": "Segment <friends@segment.com>", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "The hassle-free way to integrate analytics into any web application.", | ||
@@ -6,0 +6,0 @@ "types": "lib/index.d.ts", |
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
188197
56