@mparticle/web-sdk
Advanced tools
Comparing version 2.23.5 to 2.23.6
{ | ||
"name": "@mparticle/web-sdk", | ||
"version": "2.23.5", | ||
"version": "2.23.6", | ||
"description": "mParticle core SDK for web applications", | ||
@@ -137,5 +137,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@babel/runtime": "^7.6.0", | ||
"slugify": "^1.3.6" | ||
"@babel/runtime": "^7.6.0" | ||
} | ||
} |
@@ -480,3 +480,3 @@ // | ||
* @param {String} [eventName] The name of the event | ||
* @param {Number} [eventType] The eventType as seen [here](http://docs.mparticle.com/developers/sdk/javascript/event-tracking#event-type) | ||
* @param {Number} [eventType] The eventType as seen [here](http://docs.mparticle.com/developers/sdk/web/event-tracking#event-type) | ||
* @param {Object} [eventInfo] Attributes for the event | ||
@@ -498,3 +498,3 @@ */ | ||
* @param {String} [eventName] The name of the event | ||
* @param {Number} [eventType] The eventType as seen [here](http://docs.mparticle.com/developers/sdk/javascript/event-tracking#event-type) | ||
* @param {Number} [eventType] The eventType as seen [here](http://docs.mparticle.com/developers/sdk/web/event-tracking#event-type) | ||
* @param {Object} [eventInfo] Attributes for the event | ||
@@ -501,0 +501,0 @@ */ |
@@ -1,2 +0,1 @@ | ||
import slugify from 'slugify'; | ||
import Constants from './constants'; | ||
@@ -207,6 +206,13 @@ | ||
// TODO: Refactor this to a regex | ||
const isDataPlanSlug = (str: string): boolean => | ||
isString(str) && str === slugify(str); | ||
const toDataPlanSlug = (value: any): string => | ||
// Make sure we are only acting on strings or numbers | ||
isStringOrNumber(value) | ||
? value | ||
.toString() | ||
.toLowerCase() | ||
.replace(/[^0-9a-zA-Z]+/g, '_') | ||
: ''; | ||
const isDataPlanSlug = (str: string): boolean => str === toDataPlanSlug(str); | ||
const isStringOrNumber = (value: any): boolean => | ||
@@ -239,2 +245,3 @@ isString(value) || isNumber(value); | ||
returnConvertedBoolean, | ||
toDataPlanSlug, | ||
isString, | ||
@@ -241,0 +248,0 @@ isNumber, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1
1459068
26150
- Removedslugify@^1.3.6
- Removedslugify@1.6.6(transitive)