d3-collection
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1,1 +0,1 @@ | ||
var version = "0.1.1"; export * from "../index"; export {version}; | ||
var version = "0.1.2"; export * from "../index"; export {version}; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.d3_collection = {}))); | ||
(factory((global.d3_collection = global.d3_collection || {}))); | ||
}(this, function (exports) { 'use strict'; | ||
@@ -12,2 +12,3 @@ | ||
Map.prototype = map.prototype = { | ||
constructor: Map, | ||
has: function(key) { | ||
@@ -165,2 +166,3 @@ return (prefix + key) in this; | ||
Set.prototype = set.prototype = { | ||
constructor: Set, | ||
has: proto.has, | ||
@@ -214,3 +216,3 @@ add: function(value) { | ||
var version = "0.1.1"; | ||
var version = "0.1.2"; | ||
@@ -217,0 +219,0 @@ exports.version = version; |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.d3_collection={})}(this,function(n){"use strict";function t(){}function e(n,e){var r=new t;if(n instanceof t)n.each(function(n,t){r.set(t,n)});else if(Array.isArray(n)){var i,u=-1,o=n.length;if(null==e)for(;++u<o;)r.set(u,n[u]);else for(;++u<o;)r.set(e(i=n[u],u,n),i)}else if(n)for(var s in n)r.set(s,n[s]);return r}function r(){function n(t,i,u,o){if(i>=a.length)return f?f(t):r?t.sort(r):t;for(var s,c,h,v=-1,l=t.length,p=a[i++],y=e(),d=u();++v<l;)(h=y.get(s=p(c=t[v])+""))?h.push(c):y.set(s,[c]);return y.each(function(t,e){o(d,e,n(t,i,u,o))}),d}function t(n,e){if(e>=a.length)return n;var r=[],i=h[e++];return n.each(function(n,i){r.push({key:i,values:t(n,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var r,f,c,a=[],h=[];return c={object:function(t){return n(t,0,i,u)},map:function(t){return n(t,0,o,s)},entries:function(e){return t(n(e,0,o,s),0)},key:function(n){return a.push(n),c},sortKeys:function(n){return h[a.length-1]=n,c},sortValues:function(n){return r=n,c},rollup:function(n){return f=n,c}}}function i(){return{}}function u(n,t,e){n[t]=e}function o(){return e()}function s(n,t,e){n.set(t,e)}function f(){}function c(n,t){var e=new f;if(n instanceof f)n.each(function(n){e.add(n)});else if(n){var r=-1,i=n.length;if(null==t)for(;++r<i;)e.add(n[r]);else for(;++r<i;)e.add(t(n[r],r,n))}return e}function a(n){var t=[];for(var e in n)t.push(e);return t}function h(n){var t=[];for(var e in n)t.push(n[e]);return t}function v(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t}var l="$";t.prototype=e.prototype={has:function(n){return l+n in this},get:function(n){return this[l+n]},set:function(n,t){return this[l+n]=t,this},remove:function(n){var t=l+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===l&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===l&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===l&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===l&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===l&&++n;return n},empty:function(){for(var n in this)if(n[0]===l)return!1;return!0},each:function(n){for(var t in this)t[0]===l&&n(this[t],t.slice(1),this)}};var p=e.prototype;f.prototype=c.prototype={has:p.has,add:function(n){return n+="",this[l+n]=n,this},remove:p.remove,clear:p.clear,values:p.keys,size:p.size,empty:p.empty,each:p.each};var y="0.1.1";n.version=y,n.nest=r,n.set=c,n.map=e,n.keys=a,n.values=h,n.entries=v}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.d3_collection=n.d3_collection||{})}(this,function(n){"use strict";function t(){}function e(n,e){var r=new t;if(n instanceof t)n.each(function(n,t){r.set(t,n)});else if(Array.isArray(n)){var i,u=-1,o=n.length;if(null==e)for(;++u<o;)r.set(u,n[u]);else for(;++u<o;)r.set(e(i=n[u],u,n),i)}else if(n)for(var s in n)r.set(s,n[s]);return r}function r(){function n(t,i,u,o){if(i>=a.length)return f?f(t):r?t.sort(r):t;for(var s,c,h,v=-1,l=t.length,p=a[i++],y=e(),d=u();++v<l;)(h=y.get(s=p(c=t[v])+""))?h.push(c):y.set(s,[c]);return y.each(function(t,e){o(d,e,n(t,i,u,o))}),d}function t(n,e){if(e>=a.length)return n;var r=[],i=h[e++];return n.each(function(n,i){r.push({key:i,values:t(n,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var r,f,c,a=[],h=[];return c={object:function(t){return n(t,0,i,u)},map:function(t){return n(t,0,o,s)},entries:function(e){return t(n(e,0,o,s),0)},key:function(n){return a.push(n),c},sortKeys:function(n){return h[a.length-1]=n,c},sortValues:function(n){return r=n,c},rollup:function(n){return f=n,c}}}function i(){return{}}function u(n,t,e){n[t]=e}function o(){return e()}function s(n,t,e){n.set(t,e)}function f(){}function c(n,t){var e=new f;if(n instanceof f)n.each(function(n){e.add(n)});else if(n){var r=-1,i=n.length;if(null==t)for(;++r<i;)e.add(n[r]);else for(;++r<i;)e.add(t(n[r],r,n))}return e}function a(n){var t=[];for(var e in n)t.push(e);return t}function h(n){var t=[];for(var e in n)t.push(n[e]);return t}function v(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t}var l="$";t.prototype=e.prototype={constructor:t,has:function(n){return l+n in this},get:function(n){return this[l+n]},set:function(n,t){return this[l+n]=t,this},remove:function(n){var t=l+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===l&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===l&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===l&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===l&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===l&&++n;return n},empty:function(){for(var n in this)if(n[0]===l)return!1;return!0},each:function(n){for(var t in this)t[0]===l&&n(this[t],t.slice(1),this)}};var p=e.prototype;f.prototype=c.prototype={constructor:f,has:p.has,add:function(n){return n+="",this[l+n]=n,this},remove:p.remove,clear:p.clear,values:p.keys,size:p.size,empty:p.empty,each:p.each};var y="0.1.2";n.version=y,n.nest=r,n.set=c,n.map=e,n.keys=a,n.values=h,n.entries=v}); |
{ | ||
"name": "d3-collection", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Handy data structures for elements keyed by string.", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"prepublish": "npm run test && uglifyjs build/d3-collection.js -c -m -o build/d3-collection.min.js && rm -f build/d3-collection.zip && zip -j build/d3-collection.zip -- LICENSE README.md build/d3-collection.js build/d3-collection.min.js", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git tag -am \"Release $VERSION.\" v${VERSION} && git push --tags && cp build/d3-collection.js ../d3.github.com/d3-collection.v0.1.js && cp build/d3-collection.min.js ../d3.github.com/d3-collection.v0.1.min.js && cd ../d3.github.com && git add d3-collection.v0.1.js d3-collection.v0.1.min.js && git commit -m \"d3-collection ${VERSION}\" && git push" | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-collection.js ../d3.github.com/d3-collection.v0.1.js && cp build/d3-collection.min.js ../d3.github.com/d3-collection.v0.1.min.js && cd ../d3.github.com && git add d3-collection.v0.1.js d3-collection.v0.1.min.js && git commit -m \"d3-collection ${VERSION}\" && git push" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
@@ -6,2 +6,3 @@ export var prefix = "$"; | ||
Map.prototype = map.prototype = { | ||
constructor: Map, | ||
has: function(key) { | ||
@@ -8,0 +9,0 @@ return (prefix + key) in this; |
@@ -8,2 +8,3 @@ import {default as map, prefix} from "./map"; | ||
Set.prototype = set.prototype = { | ||
constructor: Set, | ||
has: proto.has, | ||
@@ -10,0 +11,0 @@ add: function(value) { |
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
33034
369