d3-selection-multi
Advanced tools
Comparing version 0.2.10 to 0.3.0
@@ -0,6 +1,7 @@ | ||
// https://github.com/d3/d3-selection-multi Version 0.3.0. Copyright 2016 Mike Bostock. | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'd3-selection'], factory) : | ||
(factory((global.d3_selection_multi = global.d3_selection_multi || {}),global.d3_selection)); | ||
}(this, function (exports,d3Selection) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('d3-selection')) : | ||
typeof define === 'function' && define.amd ? define(['d3-selection'], factory) : | ||
(factory(global.d3)); | ||
}(this, function (d3Selection) { 'use strict'; | ||
@@ -28,3 +29,3 @@ function selection_attrs(map) { | ||
return this; | ||
}; | ||
} | ||
@@ -51,3 +52,3 @@ function selection_styles(map, priority) { | ||
return this; | ||
}; | ||
} | ||
@@ -72,3 +73,3 @@ function selection_properties(map) { | ||
return this; | ||
}; | ||
} | ||
@@ -79,6 +80,2 @@ d3Selection.selection.prototype.attrs = selection_attrs; | ||
var version = "0.2.10"; | ||
exports.version = version; | ||
})); |
@@ -1,1 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-selection"],e):e(t.d3_selection_multi=t.d3_selection_multi||{},t.d3_selection)}(this,function(t,e){"use strict";function i(t){if("function"==typeof t)return this.each(function(){var i=t.apply(this,arguments);for(var r in i){var n=i[r];r=e.namespace(r),null==n?r.local?this.removeAttributeNS(r.space,r.local):this.removeAttribute(r):r.local?this.setAttributeNS(r.space,r.local,n):this.setAttribute(r,n)}});for(var i in t)this.attr(i,t[i]);return this}function r(t,e){if(arguments.length<2&&(e=""),"function"==typeof t)return this.each(function(){var i=t.apply(this,arguments);for(var r in i){var n=i[r];null==n?this.style.removeProperty(r):this.style.setProperty(r,n,e)}});for(var i in t)this.style(i,t[i],e);return this}function n(t){if("function"==typeof t)return this.each(function(){var e=t.apply(this,arguments);for(var i in e){var r=e[i];null==r?delete this[i]:this[i]=r}});for(var e in t)this.property(e,t[e]);return this}e.selection.prototype.attrs=i,e.selection.prototype.styles=r,e.selection.prototype.properties=n;var o="0.2.10";t.version=o}); | ||
// https://github.com/d3/d3-selection-multi Version 0.3.0. Copyright 2016 Mike Bostock. | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("d3-selection")):"function"==typeof define&&define.amd?define(["d3-selection"],e):e(t.d3)}(this,function(t){"use strict";function e(e){if("function"==typeof e)return this.each(function(){var i=e.apply(this,arguments);for(var r in i){var n=i[r];r=t.namespace(r),null==n?r.local?this.removeAttributeNS(r.space,r.local):this.removeAttribute(r):r.local?this.setAttributeNS(r.space,r.local,n):this.setAttribute(r,n)}});for(var i in e)this.attr(i,e[i]);return this}function i(t,e){if(arguments.length<2&&(e=""),"function"==typeof t)return this.each(function(){var i=t.apply(this,arguments);for(var r in i){var n=i[r];null==n?this.style.removeProperty(r):this.style.setProperty(r,n,e)}});for(var i in t)this.style(i,t[i],e);return this}function r(t){if("function"==typeof t)return this.each(function(){var e=t.apply(this,arguments);for(var i in e){var r=e[i];null==r?delete this[i]:this[i]=r}});for(var e in t)this.property(e,t[e]);return this}t.selection.prototype.attrs=e,t.selection.prototype.styles=i,t.selection.prototype.properties=r}); |
{ | ||
"name": "d3-selection-multi", | ||
"version": "0.2.10", | ||
"version": "0.3.0", | ||
"description": "Multi-value map syntax for D3 selections.", | ||
@@ -23,14 +23,15 @@ "keywords": [ | ||
"scripts": { | ||
"pretest": "mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -g d3-selection:d3_selection -n d3_selection_multi -o build/d3-selection-multi.js -- build/bundle.js", | ||
"test": "faucet `find test -name '*-test.js'`", | ||
"prepublish": "npm run test && uglifyjs build/d3-selection-multi.js -c -m -o build/d3-selection-multi.min.js && rm -f build/d3-selection-multi.zip && zip -j build/d3-selection-multi.zip -- LICENSE README.md build/d3-selection-multi.js build/d3-selection-multi.min.js", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection-multi.js ../d3.github.com/d3-selection-multi.v0.2.js && cp build/d3-selection-multi.min.js ../d3.github.com/d3-selection-multi.v0.2.min.js && cd ../d3.github.com && git add d3-selection-multi.v0.2.js d3-selection-multi.v0.2.min.js && git commit -m \"d3-selection-multi ${VERSION}\" && git push" | ||
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-selection:d3 -n d3 -o build/d3-selection-multi.js -- index.js", | ||
"test": "tape 'test/**/*-test.js' && eslint index.js src", | ||
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-selection-multi.js -c -m -o build/d3-selection-multi.min.js", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection-multi.js ../d3.github.com/d3-selection-multi.v0.3.js && cp build/d3-selection-multi.min.js ../d3.github.com/d3-selection-multi.v0.3.min.js && cd ../d3.github.com && git add d3-selection-multi.v0.3.js d3-selection-multi.v0.3.min.js && git commit -m \"d3-selection-multi ${VERSION}\" && git push && cd - && zip -j build/d3-selection-multi.zip -- LICENSE README.md build/d3-selection-multi.js build/d3-selection-multi.min.js" | ||
}, | ||
"dependencies": { | ||
"d3-selection": "~0.7.0" | ||
"d3-selection": "~0.9.0" | ||
}, | ||
"devDependencies": { | ||
"faucet": "0.0", | ||
"rollup": "0.25", | ||
"jsdom": "8", | ||
"eslint": "2", | ||
"jsdom": "9", | ||
"package-preamble": "0.0", | ||
"rollup": "0.31", | ||
"tape": "4", | ||
@@ -37,0 +38,0 @@ "uglify-js": "2" |
# d3-selection-multi | ||
Multi-value map syntax for [D3 selections](https://github.com/d3/d3-selection). | ||
Multi-value map syntax for [selections](https://github.com/d3/d3-selection). | ||
## Installing | ||
If you use NPM, `npm install d3-selection-multi`. Otherwise, download the [latest release](https://github.com/d3/d3-selection-multi/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection-multi.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-selection.v0.9.min.js"></script> | ||
<script src="https://d3js.org/d3-selection-multi.v0.3.min.js"></script> | ||
<script> | ||
var div = d3.selectAll("div"); | ||
</script> | ||
``` | ||
[Try d3-selection-multi in your browser.](https://tonicdev.com/npm/d3-selection-multi) | ||
## API Reference | ||
… | ||
<a name="selection_attrs" href="#selection_attrs">#</a> <i>selection</i>.<b>attrs</b>(<i>object</i>) | ||
… | ||
<a name="selection_styles" href="#selection_styles">#</a> <i>selection</i>.<b>styles</b>(<i>object</i>) | ||
… | ||
<a name="selection_properties" href="#selection_properties">#</a> <i>selection</i>.<b>properties</b>(<i>object</i>) | ||
… |
@@ -24,2 +24,2 @@ import {namespace} from "d3-selection"; | ||
return this; | ||
}; | ||
} |
@@ -19,2 +19,2 @@ export default function(map) { | ||
return this; | ||
}; | ||
} |
@@ -21,2 +21,2 @@ export default function(map, priority) { | ||
return this; | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
9894
36
6
+ Addedd3-selection@0.9.0(transitive)
- Removedd3-selection@0.7.3(transitive)
Updatedd3-selection@~0.9.0