Socket
Socket
Sign inDemoInstall

d3-collection

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.0

6

build/d3-collection.js

@@ -0,1 +1,2 @@

// https://d3js.org/d3-collection/ Version 0.3.0. Copyright 2016 Mike Bostock.
(function (global, factory) {

@@ -7,4 +8,2 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

var version = "0.2.0";
var prefix = "$";

@@ -210,3 +209,2 @@

exports.version = version;
exports.nest = nest;

@@ -219,2 +217,4 @@ exports.set = set;

Object.defineProperty(exports, '__esModule', { value: true });
}));

@@ -1,1 +0,2 @@

!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 null!=f?f(t):null!=r?t.sort(r):t;for(var s,c,h,l=-1,v=t.length,p=a[i++],y=e(),d=u();++l<v;)(h=y.get(s=p(c=t[l])+""))?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-1];return null!=f&&e>=a.length?r=n.entries():(r=[],n.each(function(n,i){r.push({key:i,values:t(n,e)})})),null!=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 l(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t}var v="0.2.0",p="$";t.prototype=e.prototype={constructor:t,has:function(n){return p+n in this},get:function(n){return this[p+n]},set:function(n,t){return this[p+n]=t,this},remove:function(n){var t=p+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===p&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===p&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===p&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===p&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===p&&++n;return n},empty:function(){for(var n in this)if(n[0]===p)return!1;return!0},each:function(n){for(var t in this)t[0]===p&&n(this[t],t.slice(1),this)}};var y=e.prototype;f.prototype=c.prototype={constructor:f,has:y.has,add:function(n){return n+="",this[p+n]=n,this},remove:y.remove,clear:y.clear,values:y.keys,size:y.size,empty:y.empty,each:y.each},n.version=v,n.nest=r,n.set=c,n.map=e,n.keys=a,n.values=h,n.entries=l});
// https://d3js.org/d3-collection/ Version 0.3.0. Copyright 2016 Mike Bostock.
!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 null!=f?f(t):null!=r?t.sort(r):t;for(var s,c,l,h=-1,v=t.length,p=a[i++],y=e(),d=u();++h<v;)(l=y.get(s=p(c=t[h])+""))?l.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=l[e-1];return null!=f&&e>=a.length?r=n.entries():(r=[],n.each(function(n,i){r.push({key:i,values:t(n,e)})})),null!=i?r.sort(function(n,t){return i(n.key,t.key)}):r}var r,f,c,a=[],l=[];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 l[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 l(n){var t=[];for(var e in n)t.push(n[e]);return t}function h(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t}var v="$";t.prototype=e.prototype={constructor:t,has:function(n){return v+n in this},get:function(n){return this[v+n]},set:function(n,t){return this[v+n]=t,this},remove:function(n){var t=v+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===v&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===v&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===v&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===v&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===v&&++n;return n},empty:function(){for(var n in this)if(n[0]===v)return!1;return!0},each:function(n){for(var t in this)t[0]===v&&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[v+n]=n,this},remove:p.remove,clear:p.clear,values:p.keys,size:p.size,empty:p.empty,each:p.each},n.nest=r,n.set=c,n.map=e,n.keys=a,n.values=l,n.entries=h,Object.defineProperty(n,"__esModule",{value:!0})});

@@ -1,2 +0,1 @@

export {version} from "./build/package";
export {default as nest} from "./src/nest";

@@ -3,0 +2,0 @@ export {default as set} from "./src/set";

{
"name": "d3-collection",
"version": "0.2.0",
"version": "0.3.0",
"description": "Handy data structures for elements keyed by string.",

@@ -14,3 +14,3 @@ "keywords": [

],
"homepage": "https://github.com/d3/d3-collection",
"homepage": "https://d3js.org/d3-collection/",
"license": "BSD-3-Clause",

@@ -28,12 +28,12 @@ "author": {

"scripts": {
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -n d3_collection -o build/d3-collection.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -n d3_collection -o build/d3-collection.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-collection.js -c -m -o build/d3-collection.min.js",
"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.2.js && cp build/d3-collection.min.js ../d3.github.com/d3-collection.v0.2.min.js && cd ../d3.github.com && git add d3-collection.v0.2.js d3-collection.v0.2.min.js && git commit -m \"d3-collection ${VERSION}\" && git push && cd - && zip -j build/d3-collection.zip -- LICENSE README.md build/d3-collection.js build/d3-collection.min.js"
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-collection.js -c -m -o build/d3-collection.min.js",
"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.3.js && cp build/d3-collection.min.js ../d3.github.com/d3-collection.v0.3.min.js && cd ../d3.github.com && git add d3-collection.v0.3.js d3-collection.v0.3.min.js && git commit -m \"d3-collection ${VERSION}\" && git push && cd - && zip -j build/d3-collection.zip -- LICENSE README.md build/d3-collection.js build/d3-collection.min.js"
},
"devDependencies": {
"d3-array": "~0.7.0",
"d3-array": "~0.8.0",
"eslint": "2",
"json2module": "0.0",
"rollup": "0.26",
"package-preamble": "0.0",
"rollup": "0.27",
"tape": "4",

@@ -40,0 +40,0 @@ "uglify-js": "2"

@@ -7,9 +7,9 @@ # d3-collection

If you use NPM, `npm install d3-collection`. Otherwise, download the [latest release](https://github.com/d3/d3-collection/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-collection.v0.2.min.js) or as part of [D3 4.0 alpha](https://github.com/mbostock/d3/tree/4). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_collection` global is exported:
If you use NPM, `npm install d3-collection`. Otherwise, download the [latest release](https://github.com/d3/d3-collection/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-collection.v0.3.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
```html
<script src="https://d3js.org/d3-collection.v0.2.min.js"></script>
<script src="https://d3js.org/d3-collection.v0.3.min.js"></script>
<script>
var map = d3_collection.map()
var map = d3.map()
.set("foo", 1)

@@ -16,0 +16,0 @@ .set("bar", 2);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc