keen-tracking
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,4 +7,11 @@ <!-- | ||
**BREAKING:** | ||
**CHANGE:** | ||
--> | ||
<a name="1.0.2"></a> | ||
# 1.0.2 | ||
**CHANGED:** | ||
* Cookie values that are strings *or* JSON can be successfully retreived using the same `.get` function form the `Keen.utils.cookie` module. The `.get` function now intelligently decides whether to return a Javascript object or a simple string value. | ||
<a name="1.0.1"></a> | ||
@@ -11,0 +18,0 @@ # 1.0.1 |
@@ -26,5 +26,5 @@ var Cookies = require('js-cookie'); | ||
if (Cookies.get(this.config.key)) { | ||
data = JSON.parse(Cookies.get(this.config.key)); | ||
data = Cookies.getJSON(this.config.key); | ||
} | ||
if (str) { | ||
if (str && typeof data === 'object' && typeof data !== null) { | ||
return (typeof data[str] !== 'undefined') ? data[str] : null; | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "keen-tracking", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Data Collection SDK for Keen IO", | ||
@@ -5,0 +5,0 @@ "main": "lib/server.js", |
@@ -133,3 +133,3 @@ # keen-tracking.js [![Build Status](https://travis-ci.org/keen/keen-tracking.js.svg?branch=master)](https://travis-ci.org/keen/keen-tracking.js) | ||
var latest,prev=name!=='Keen'&&window.Keen?window.Keen:false;ctx[name]=ctx[name]||{ready:function(fn){var h=document.getElementsByTagName('head')[0],s=document.createElement('script'),w=window,loaded;s.onload=s.onerror=s.onreadystatechange=function(){if((s.readyState&&!(/^c|loade/.test(s.readyState)))||loaded){return}s.onload=s.onreadystatechange=null;loaded=1;latest=w.Keen;if(prev){w.Keen=prev}else{try{delete w.Keen}catch(e){w.Keen=void 0}}ctx[name]=latest;ctx[name].ready(fn)};s.async=1;s.src=path;h.parentNode.insertBefore(s,h)}} | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.1.min.js',this); | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.2.min.js',this); | ||
@@ -136,0 +136,0 @@ // Executes when the library is loaded and ready |
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
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
78226
2