├── .babelrc ├── .gitignore ├── .htmlhintrc ├── .jscsrc ├── .jshintrc ├── LICENSE ├── README.md ├── assets ├── icons │ └── pin.svg └── social │ ├── FB-f-Logo__blue_1024.png │ ├── In-2C-128px-TM.png │ ├── Twitter_logo_blue.png │ └── logo_google_plus_128px.png ├── data ├── d3-array.json ├── d3-arrays.json ├── d3-axis.json ├── d3-collection.json ├── d3-color.json ├── d3-dispatch.json ├── d3-drag.json ├── d3-dsv.json ├── d3-ease.json ├── d3-force.json ├── d3-format.json ├── d3-hierarchy.json ├── d3-interpolate.json ├── d3-path.json ├── d3-polygon.json ├── d3-quadtree.json ├── d3-queue.json ├── d3-random.json ├── d3-request.json ├── d3-scale.json ├── d3-selection.json ├── d3-shape.json ├── d3-time-format.json ├── d3-time.json ├── d3-timer.json ├── d3-transition.json ├── d3-voronoi.json ├── d3.json ├── rw.json └── xmlhttprequest.json ├── doc └── images │ ├── d3_modules_clients_shown_or_hidden.gif │ ├── d3_modules_d3_axis_sets.png │ ├── d3_modules_dependencies_set_or_links.gif │ ├── d3_modules_use_first_or_last.gif │ └── usage_quick.gif ├── gulp ├── index.js ├── opts.js └── tasks │ ├── assets.js │ ├── build.js │ ├── data.js │ ├── default.js │ ├── html.js │ ├── images.js │ ├── logic.js │ ├── serve.js │ └── style.js ├── gulpfile.js ├── package.json └── src ├── scripts └── grab_modules.js └── viz ├── index.html ├── logic ├── index.js └── utils │ ├── dom.js │ └── semver.js ├── style ├── _mixins.less ├── _vars.less ├── chart.less ├── common.less ├── index.less ├── media.less └── sidebar.less └── templates └── analytics.html /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /.htmlhintrc: -------------------------------------------------------------------------------- 1 | { 2 | "alt-require": false, 3 | "attr-lowercase": true, 4 | "attr-no-duplication": true, 5 | "attr-value-double-quotes": true, 6 | "attr-value-not-empty": false, 7 | "attr-unsafe-chars": true, 8 | "doctype-first": false, 9 | "doctype-html5": false, 10 | "head-script-disabled": false, 11 | "href-abs-or-rel": false, 12 | "id-class-value": false, 13 | "id-class-ad-disabled": false, 14 | "id-unique": true, 15 | "inline-style-disabled": false, 16 | "inline-script-disabled": false, 17 | "space-tab-mixed-disabled": true, 18 | "spec-char-escape": true, 19 | "src-not-empty": true, 20 | "style-disabled": false, 21 | "tag-pair": true, 22 | "tag-self-close": false, 23 | "tagname-lowercase": true, 24 | "title-require": false 25 | } 26 | -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | // http://jscs.info/rules.html 2 | 3 | { 4 | "disallowAnonymousFunctions": null, 5 | "requireAnonymousFunctions": null, 6 | 7 | "disallowArrowFunctions": null, 8 | "requireArrowFunctions": null, 9 | 10 | "disallowCapitalizedComments": null, 11 | "requireCapitalizedComments": null, 12 | 13 | "disallowCommaBeforeLineBreak": null, 14 | "requireCommaBeforeLineBreak": null, 15 | 16 | "disallowCurlyBraces": null, 17 | "requireCurlyBraces": true, 18 | 19 | "disallowFunctionDeclarations": null, 20 | "requireFunctionDeclarations": null, 21 | 22 | "disallowDanglingUnderscores": false, 23 | "disallowEmptyBlocks": {"allExcept": ["comments"]}, 24 | "disallowIdentifierNames": [], 25 | "disallowImplicitTypeConversion": [], 26 | "disallowKeywords": [], 27 | "disallowKeywordsInComments": null, 28 | 29 | "disallowKeywordsOnNewLine": [], 30 | "requireKeywordsOnNewLine": [], 31 | 32 | "disallowMixedSpacesAndTabs": "smart", 33 | "disallowMultipleLineBreaks": null, 34 | "disallowMultipleLineStrings": true, 35 | "disallowMultipleSpaces": null, 36 | 37 | "disallowMultipleVarDecl": null, 38 | "requireMultipleVarDecl": null, 39 | 40 | "disallowTrailingComma": null, 41 | "requireTrailingComma": null, 42 | 43 | "validateIndentation": null, 44 | 45 | "jsDoc": { 46 | "enforceExistence": false, 47 | "checkAnnotations": true, 48 | "checkParamNames": true, 49 | "requireParamTypes": true, 50 | "checkRedundantParams": true, 51 | "checkReturnTypes": true, 52 | "checkRedundantReturns": true, 53 | "requireReturnTypes": true, 54 | "checkTypes": "capitalizedNativeCase", 55 | "checkRedundantAccess": "enforceLeadingUnderscore", 56 | "leadingUnderscoreAccess": true, 57 | "requireHyphenBeforeDescription": true, 58 | "requireNewlineAfterDescription": true, 59 | "disallowNewlineAfterDescription": true, 60 | "requireDescriptionCompleteSentence": true, 61 | "requireParamDescription": true 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | // annotated example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc 2 | // http://jshint.com/docs/options/ 3 | { 4 | "esversion": 6, 5 | "maxerr": 50, 6 | 7 | "bitwise": true, 8 | "curly": true, 9 | "eqeqeq": true, 10 | "forin": true, 11 | "freeze": true, 12 | "latedef": false, 13 | "noarg": true, 14 | "nonbsp": true, 15 | "nonew": false, 16 | "plusplus": false, 17 | "undef": false, 18 | "unused": false, 19 | "strict": false, 20 | "maxparams": false, 21 | "maxdepth": false, 22 | "maxstatements": false, 23 | "maxcomplexity": false, 24 | "varstmt": false, 25 | 26 | "asi": true, 27 | "boss": false, 28 | "debug": false, 29 | "eqnull": false, 30 | "moz": false, 31 | "evil": false, 32 | "expr": false, 33 | "funcscope": false, 34 | "globalstrict": true, 35 | "iterator": false, 36 | "lastsemic": false, 37 | "loopfunc": false, 38 | "noyield": false, 39 | "notypeof": false, 40 | "proto": false, 41 | "scripturl": false, 42 | "shadow": true, 43 | "supernew": false, 44 | "validthis": false, 45 | 46 | "browser": true, 47 | "browserify": true, 48 | "couch": false, 49 | "devel": true, 50 | "dojo": false, 51 | "jasmine": false, 52 | "jquery": false, 53 | "mocha": false, 54 | "mootools": false, 55 | "node": false, 56 | "nonstandard": false, 57 | "phantom": false, 58 | "prototypejs": false, 59 | "qunit": false, 60 | "rhino": false, 61 | "shelljs": false, 62 | "typed": false, 63 | "worker": false, 64 | "wsh": false, 65 | "yui": false, 66 | 67 | "globals": {}, 68 | 69 | "laxcomma": true 70 | } 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [D3 modules dependency time graphs](http://mindrones.github.io/timely-dependency-graph/#npm/d3) 2 | 3 | As of today, this script create dependency graphs of [D3 modules](https://github.com/d3), for `d3` version 4+. 4 | In the future it might support generic `npm` modules. 5 | 6 | Focusing on a certain release of a d3 module, you can visualize its dependencies tree and the modules that depends on the focused release. 7 | 8 | ![Example: focusing on d3-axis](https://raw.githubusercontent.com/mindrones/timely-dependency-graph/master/doc/images/d3_modules_d3_axis_sets.png) 9 | 10 | ## Usage 11 | 12 | ![Quick usage](https://raw.githubusercontent.com/mindrones/timely-dependency-graph/master/doc/images/usage_quick.gif) 13 | 14 | ### Interaction 15 | 16 | - With the mouse, hover the release rectangles to show their dependencies graph 17 | - `click` on a release: pin/unpin it (then you can change how to display the dependencies graph using sidebar's controls) 18 | - `mouse wheel`: zoom in and out 19 | - `mouse drag`: pan left-right 20 | 21 | ### UI terminology 22 | 23 | - `server`: a module the focused release depends on 24 | - `client`: a module depending on the hovered release 25 | 26 | (this will most certainly change in the future) 27 | 28 | ### Sidebar 29 | 30 | **FOCUS panel** 31 | 32 | Shows: 33 | 34 | - the cursor date and time 35 | - the hovered release `name`, `version`, `date` and `time` 36 | 37 | **CONTROLS panel** 38 | 39 | - Choose how you want to inspect dependencies release date. 40 | 41 | For example, `d3-shape` version `0.6.0` depends on `d3-path` version `~0.1.3`. In [semver](https://github.com/npm/node-semver) lingo this is a version `range` meaning `>=0.1.3 <0.2.0`, hence as of now: 42 | - the first valid version of `d3-path` as a dependency of `d3-shape` `0.6.0` is `0.1.3`; 43 | - the last valid version of `d3-path` as a dependency of `d3-shape` `0.6.0` is `0.1.5`. 44 | 45 | ![First and last valid dependency version](https://raw.githubusercontent.com/mindrones/timely-dependency-graph/master/doc/images/d3_modules_use_first_or_last.gif) 46 | 47 | - Choose how to visualize "servers" (dependencies): 48 | - as "sets" (lines passing through the focused release and all servers); 49 | - as links between each server and the focused release. 50 | 51 | ![Show dependencies as sets or links](https://raw.githubusercontent.com/mindrones/timely-dependency-graph/master/doc/images/d3_modules_dependencies_set_or_links.gif) 52 | 53 | Note that dependencies graph is a tree (because dependencies have their own dependencies): 54 | - since a set is basically a subtree, the color of a set is the color of the module originating that subtree; 55 | - links, instead, gets the color of the dependency. 56 | 57 | - Choose if you want to see "client lines", links between the focused release and its clients. 58 | 59 | ![Show or hide clients](https://raw.githubusercontent.com/mindrones/timely-dependency-graph/master/doc/images/d3_modules_clients_shown_or_hidden.gif) 60 | 61 | **LEGEND panel** 62 | 63 | Shows graphs elements representation associated with their meaning. 64 | Well, it's a legend :) 65 | 66 | 67 | ## To run it locally 68 | 69 | Install dependencies: 70 | 71 | - [optional] install `node` and `npm` on your system 72 | - `cd ` 73 | - `clone git@github.com:mindrones/timely-dependency-graph.git` 74 | - `cd timely-dependency-graph` 75 | - `npm install` 76 | 77 | Run: 78 | 79 | - `gulp` 80 | - when prompted, navigate to [http://localhost:8001](http://localhost:8001) 81 | -------------------------------------------------------------------------------- /assets/icons/pin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/social/FB-f-Logo__blue_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/assets/social/FB-f-Logo__blue_1024.png -------------------------------------------------------------------------------- /assets/social/In-2C-128px-TM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/assets/social/In-2C-128px-TM.png -------------------------------------------------------------------------------- /assets/social/Twitter_logo_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/assets/social/Twitter_logo_blue.png -------------------------------------------------------------------------------- /assets/social/logo_google_plus_128px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/assets/social/logo_google_plus_128px.png -------------------------------------------------------------------------------- /data/d3-arrays.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "d3-arrays", 3 | "_rev": "24-589da8a68b10fc356aba4f2fa0716f98", 4 | "name": "d3-arrays", 5 | "description": "DEPRECATED; renamed to d3-array (singular).", 6 | "dist-tags": { 7 | "latest": "0.4.1" 8 | }, 9 | "versions": { 10 | "0.0.0": { 11 | "name": "d3-arrays", 12 | "version": "0.0.0", 13 | "description": "The functions from src/arrays in the d3 repo", 14 | "main": "index.js", 15 | "scripts": { 16 | "build": "smash node_modules/d3/src/start.js node_modules/d3/src/arrays/index.js node_modules/d3/src/end.js | uglifyjs - -b -indent-level=2 -o index.js", 17 | "test": "echo \"Error: no test specified\" && exit 1" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/jfsiii/d3-arrays.git" 22 | }, 23 | "keywords": [ 24 | "d3", 25 | "arrays" 26 | ], 27 | "author": { 28 | "name": "JFSIII" 29 | }, 30 | "license": "ISC", 31 | "devDependencies": { 32 | "d3": "^3.4.4", 33 | "smash": "0.0.12", 34 | "uglify-js": "^2.4.13" 35 | }, 36 | "bugs": { 37 | "url": "https://github.com/jfsiii/d3-arrays/issues" 38 | }, 39 | "homepage": "https://github.com/jfsiii/d3-arrays", 40 | "_id": "d3-arrays@0.0.0", 41 | "dist": { 42 | "shasum": "e5384fe62a7263620422f32275df65b0b94f1cee", 43 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.0.0.tgz" 44 | }, 45 | "_from": ".", 46 | "_npmVersion": "1.4.6", 47 | "_npmUser": { 48 | "name": "jfsiii", 49 | "email": "npmjs.org@JFSIII.org" 50 | }, 51 | "maintainers": [ 52 | { 53 | "name": "jfsiii", 54 | "email": "npmjs.org@JFSIII.org" 55 | } 56 | ], 57 | "deprecated": "Renamed d3-array (singular).", 58 | "directories": {} 59 | }, 60 | "0.0.1": { 61 | "name": "d3-arrays", 62 | "version": "0.0.1", 63 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 64 | "keywords": [ 65 | "d3", 66 | "array" 67 | ], 68 | "homepage": "https://github.com/d3/d3-arrays", 69 | "license": "BSD-3-Clause", 70 | "author": { 71 | "name": "Mike Bostock", 72 | "url": "http://bost.ocks.org/mike" 73 | }, 74 | "main": "build/arrays", 75 | "jsnext:main": "index", 76 | "repository": { 77 | "type": "git", 78 | "url": "https://github.com/d3/d3-arrays.git" 79 | }, 80 | "scripts": { 81 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=arrays -- index.js > build/arrays.js", 82 | "test": "faucet `find test -name '*-test.js'`", 83 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js" 84 | }, 85 | "devDependencies": { 86 | "d3-bundler": "~0.2.5", 87 | "faucet": "0.0", 88 | "tape": "4", 89 | "uglifyjs": "2" 90 | }, 91 | "gitHead": "73df07a058948456ee87a6d927d907005cfb31dc", 92 | "bugs": { 93 | "url": "https://github.com/d3/d3-arrays/issues" 94 | }, 95 | "_id": "d3-arrays@0.0.1", 96 | "_shasum": "f1d2ca01a3100c0176d98f5232c78ec6f475e0b3", 97 | "_from": ".", 98 | "_npmVersion": "2.7.5", 99 | "_nodeVersion": "0.12.2", 100 | "_npmUser": { 101 | "name": "mbostock", 102 | "email": "mike@ocks.org" 103 | }, 104 | "dist": { 105 | "shasum": "f1d2ca01a3100c0176d98f5232c78ec6f475e0b3", 106 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.0.1.tgz" 107 | }, 108 | "maintainers": [ 109 | { 110 | "name": "mbostock", 111 | "email": "mike@ocks.org" 112 | } 113 | ], 114 | "deprecated": "Renamed d3-array (singular).", 115 | "directories": {} 116 | }, 117 | "0.0.2": { 118 | "name": "d3-arrays", 119 | "version": "0.0.2", 120 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 121 | "keywords": [ 122 | "d3", 123 | "nest", 124 | "bisect", 125 | "shuffle", 126 | "array" 127 | ], 128 | "homepage": "https://github.com/d3/d3-arrays", 129 | "license": "BSD-3-Clause", 130 | "author": { 131 | "name": "Mike Bostock", 132 | "url": "http://bost.ocks.org/mike" 133 | }, 134 | "main": "build/arrays", 135 | "jsnext:main": "index", 136 | "repository": { 137 | "type": "git", 138 | "url": "https://github.com/d3/d3-arrays.git" 139 | }, 140 | "scripts": { 141 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=arrays -- index.js > build/arrays.js", 142 | "test": "faucet `find test -name '*-test.js'`", 143 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js" 144 | }, 145 | "devDependencies": { 146 | "d3-bundler": "~0.2.5", 147 | "faucet": "0.0", 148 | "seedrandom": "2", 149 | "tape": "4", 150 | "uglifyjs": "2" 151 | }, 152 | "gitHead": "5926c61b2bca00dbe6165789e19ca704002696a7", 153 | "bugs": { 154 | "url": "https://github.com/d3/d3-arrays/issues" 155 | }, 156 | "_id": "d3-arrays@0.0.2", 157 | "_shasum": "539ce777cc9f2d9a4803b91155ef14664f58b398", 158 | "_from": ".", 159 | "_npmVersion": "2.7.5", 160 | "_nodeVersion": "0.12.2", 161 | "_npmUser": { 162 | "name": "mbostock", 163 | "email": "mike@ocks.org" 164 | }, 165 | "dist": { 166 | "shasum": "539ce777cc9f2d9a4803b91155ef14664f58b398", 167 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.0.2.tgz" 168 | }, 169 | "maintainers": [ 170 | { 171 | "name": "mbostock", 172 | "email": "mike@ocks.org" 173 | } 174 | ], 175 | "deprecated": "Renamed d3-array (singular).", 176 | "directories": {} 177 | }, 178 | "0.0.3": { 179 | "name": "d3-arrays", 180 | "version": "0.0.3", 181 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 182 | "keywords": [ 183 | "d3", 184 | "nest", 185 | "bisect", 186 | "shuffle", 187 | "array" 188 | ], 189 | "homepage": "https://github.com/d3/d3-arrays", 190 | "license": "BSD-3-Clause", 191 | "author": { 192 | "name": "Mike Bostock", 193 | "url": "http://bost.ocks.org/mike" 194 | }, 195 | "main": "build/arrays", 196 | "jsnext:main": "index", 197 | "repository": { 198 | "type": "git", 199 | "url": "https://github.com/d3/d3-arrays.git" 200 | }, 201 | "scripts": { 202 | "pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=arrays -- index.js > build/arrays.js", 203 | "test": "faucet `find test -name '*-test.js'`", 204 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js" 205 | }, 206 | "devDependencies": { 207 | "d3-bundler": "~0.2.5", 208 | "faucet": "0.0", 209 | "seedrandom": "2", 210 | "tape": "4", 211 | "uglifyjs": "2" 212 | }, 213 | "gitHead": "2011c71d44491ac152dc970d3c910d37cc437930", 214 | "bugs": { 215 | "url": "https://github.com/d3/d3-arrays/issues" 216 | }, 217 | "_id": "d3-arrays@0.0.3", 218 | "_shasum": "d4703f3ad1ede60efab6cbe1e7b0430e3b62a697", 219 | "_from": ".", 220 | "_npmVersion": "2.7.5", 221 | "_nodeVersion": "0.12.2", 222 | "_npmUser": { 223 | "name": "mbostock", 224 | "email": "mike@ocks.org" 225 | }, 226 | "dist": { 227 | "shasum": "d4703f3ad1ede60efab6cbe1e7b0430e3b62a697", 228 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.0.3.tgz" 229 | }, 230 | "maintainers": [ 231 | { 232 | "name": "mbostock", 233 | "email": "mike@ocks.org" 234 | } 235 | ], 236 | "deprecated": "Renamed d3-array (singular).", 237 | "directories": {} 238 | }, 239 | "0.0.4": { 240 | "name": "d3-arrays", 241 | "version": "0.0.4", 242 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 243 | "keywords": [ 244 | "d3", 245 | "nest", 246 | "bisect", 247 | "shuffle", 248 | "array" 249 | ], 250 | "homepage": "https://github.com/d3/d3-arrays", 251 | "license": "BSD-3-Clause", 252 | "author": { 253 | "name": "Mike Bostock", 254 | "url": "http://bost.ocks.org/mike" 255 | }, 256 | "main": "build/arrays", 257 | "jsnext:main": "index", 258 | "repository": { 259 | "type": "git", 260 | "url": "https://github.com/d3/d3-arrays.git" 261 | }, 262 | "scripts": { 263 | "pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=arrays -- index.js > build/arrays.js", 264 | "test": "faucet `find test -name '*-test.js'`", 265 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 266 | }, 267 | "devDependencies": { 268 | "d3-bundler": "~0.2.5", 269 | "faucet": "0.0", 270 | "seedrandom": "2", 271 | "tape": "4", 272 | "uglifyjs": "2" 273 | }, 274 | "gitHead": "ec1e39e3488e440ff839b3ac31225a15f1f6880a", 275 | "bugs": { 276 | "url": "https://github.com/d3/d3-arrays/issues" 277 | }, 278 | "_id": "d3-arrays@0.0.4", 279 | "_shasum": "3491d59be82cf860e3118ff1036370d1c2847e88", 280 | "_from": ".", 281 | "_npmVersion": "2.7.5", 282 | "_nodeVersion": "0.12.2", 283 | "_npmUser": { 284 | "name": "mbostock", 285 | "email": "mbostock@gmail.com" 286 | }, 287 | "maintainers": [ 288 | { 289 | "name": "mbostock", 290 | "email": "mike@ocks.org" 291 | } 292 | ], 293 | "dist": { 294 | "shasum": "3491d59be82cf860e3118ff1036370d1c2847e88", 295 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.0.4.tgz" 296 | }, 297 | "deprecated": "Renamed d3-array (singular).", 298 | "directories": {} 299 | }, 300 | "0.1.0": { 301 | "name": "d3-arrays", 302 | "version": "0.1.0", 303 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 304 | "keywords": [ 305 | "d3", 306 | "nest", 307 | "bisect", 308 | "shuffle", 309 | "array" 310 | ], 311 | "homepage": "https://github.com/d3/d3-arrays", 312 | "license": "BSD-3-Clause", 313 | "author": { 314 | "name": "Mike Bostock", 315 | "url": "http://bost.ocks.org/mike" 316 | }, 317 | "main": "build/arrays", 318 | "jsnext:main": "index", 319 | "repository": { 320 | "type": "git", 321 | "url": "git+https://github.com/d3/d3-arrays.git" 322 | }, 323 | "scripts": { 324 | "pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=arrays -- index.js > build/arrays.js", 325 | "test": "faucet `find test -name '*-test.js'`", 326 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 327 | }, 328 | "devDependencies": { 329 | "d3-bundler": "~0.2.5", 330 | "faucet": "0.0", 331 | "seedrandom": "2", 332 | "tape": "4", 333 | "uglify-js": "2" 334 | }, 335 | "gitHead": "13ec581a146ad8b44fb970b1ef01d51fee15976b", 336 | "bugs": { 337 | "url": "https://github.com/d3/d3-arrays/issues" 338 | }, 339 | "_id": "d3-arrays@0.1.0", 340 | "_shasum": "6ae3b19b4595cdd0533d9cc704326a0774f74432", 341 | "_from": ".", 342 | "_npmVersion": "2.11.2", 343 | "_nodeVersion": "0.12.5", 344 | "_npmUser": { 345 | "name": "mbostock", 346 | "email": "mbostock@gmail.com" 347 | }, 348 | "maintainers": [ 349 | { 350 | "name": "mbostock", 351 | "email": "mike@ocks.org" 352 | } 353 | ], 354 | "dist": { 355 | "shasum": "6ae3b19b4595cdd0533d9cc704326a0774f74432", 356 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.1.0.tgz" 357 | }, 358 | "deprecated": "Renamed d3-array (singular).", 359 | "directories": {} 360 | }, 361 | "0.1.1": { 362 | "name": "d3-arrays", 363 | "version": "0.1.1", 364 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 365 | "keywords": [ 366 | "d3", 367 | "nest", 368 | "bisect", 369 | "shuffle", 370 | "array" 371 | ], 372 | "homepage": "https://github.com/d3/d3-arrays", 373 | "license": "BSD-3-Clause", 374 | "author": { 375 | "name": "Mike Bostock", 376 | "url": "http://bost.ocks.org/mike" 377 | }, 378 | "main": "build/arrays", 379 | "jsnext:main": "index", 380 | "repository": { 381 | "type": "git", 382 | "url": "git+https://github.com/d3/d3-arrays.git" 383 | }, 384 | "scripts": { 385 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=arrays -- index.js > build/arrays.js", 386 | "test": "faucet `find test -name '*-test.js'`", 387 | "prepublish": "npm run test && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 388 | }, 389 | "devDependencies": { 390 | "d3-bundler": "~0.2.5", 391 | "faucet": "0.0", 392 | "seedrandom": "2", 393 | "tape": "4", 394 | "uglify-js": "2" 395 | }, 396 | "gitHead": "6dfe7c5145697cc519f242fa6a3bfe6d8a46d7b2", 397 | "bugs": { 398 | "url": "https://github.com/d3/d3-arrays/issues" 399 | }, 400 | "_id": "d3-arrays@0.1.1", 401 | "_shasum": "68382996ac9be5b68e6ec11ec7f475ea45f06dd3", 402 | "_from": ".", 403 | "_npmVersion": "2.11.2", 404 | "_nodeVersion": "0.12.5", 405 | "_npmUser": { 406 | "name": "mbostock", 407 | "email": "mbostock@gmail.com" 408 | }, 409 | "maintainers": [ 410 | { 411 | "name": "mbostock", 412 | "email": "mike@ocks.org" 413 | } 414 | ], 415 | "dist": { 416 | "shasum": "68382996ac9be5b68e6ec11ec7f475ea45f06dd3", 417 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.1.1.tgz" 418 | }, 419 | "deprecated": "Renamed d3-array (singular).", 420 | "directories": {} 421 | }, 422 | "0.1.2": { 423 | "name": "d3-arrays", 424 | "version": "0.1.2", 425 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 426 | "keywords": [ 427 | "d3", 428 | "nest", 429 | "bisect", 430 | "shuffle", 431 | "array" 432 | ], 433 | "homepage": "https://github.com/d3/d3-arrays", 434 | "license": "BSD-3-Clause", 435 | "author": { 436 | "name": "Mike Bostock", 437 | "url": "http://bost.ocks.org/mike" 438 | }, 439 | "main": "build/arrays.cjs", 440 | "jsnext:main": "index", 441 | "repository": { 442 | "type": "git", 443 | "url": "git+https://github.com/d3/d3-arrays.git" 444 | }, 445 | "scripts": { 446 | "pretest": "mkdir -p build && d3-bundler -x -f cjs -o build/arrays.cjs.js", 447 | "test": "faucet `find test -name '*-test.js'`", 448 | "prepublish": "npm run test && d3-bundler -n arrays -o build/arrays.js && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 449 | }, 450 | "devDependencies": { 451 | "d3-bundler": "~0.4.0", 452 | "faucet": "0.0", 453 | "seedrandom": "2", 454 | "tape": "4", 455 | "uglify-js": "2" 456 | }, 457 | "gitHead": "3b2508cff9664f244607e8008047d0a5adcfa195", 458 | "bugs": { 459 | "url": "https://github.com/d3/d3-arrays/issues" 460 | }, 461 | "_id": "d3-arrays@0.1.2", 462 | "_shasum": "7ca84bf1798d24b23c86801b28a5b2e1912d4500", 463 | "_from": ".", 464 | "_npmVersion": "3.3.9", 465 | "_nodeVersion": "5.0.0", 466 | "_npmUser": { 467 | "name": "mbostock", 468 | "email": "mbostock@gmail.com" 469 | }, 470 | "maintainers": [ 471 | { 472 | "name": "mbostock", 473 | "email": "mike@ocks.org" 474 | } 475 | ], 476 | "dist": { 477 | "shasum": "7ca84bf1798d24b23c86801b28a5b2e1912d4500", 478 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.1.2.tgz" 479 | }, 480 | "deprecated": "Renamed d3-array (singular).", 481 | "directories": {} 482 | }, 483 | "0.2.0": { 484 | "name": "d3-arrays", 485 | "version": "0.2.0", 486 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 487 | "keywords": [ 488 | "d3", 489 | "nest", 490 | "bisect", 491 | "shuffle", 492 | "array" 493 | ], 494 | "homepage": "https://github.com/d3/d3-arrays", 495 | "license": "BSD-3-Clause", 496 | "author": { 497 | "name": "Mike Bostock", 498 | "url": "http://bost.ocks.org/mike" 499 | }, 500 | "main": "build/arrays.cjs", 501 | "jsnext:main": "index", 502 | "repository": { 503 | "type": "git", 504 | "url": "git+https://github.com/d3/d3-arrays.git" 505 | }, 506 | "scripts": { 507 | "pretest": "mkdir -p build && d3-bundler -x -f cjs -o build/arrays.cjs.js", 508 | "test": "faucet `find test -name '*-test.js'`", 509 | "prepublish": "npm run test && d3-bundler -n arrays -o build/arrays.js && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 510 | }, 511 | "devDependencies": { 512 | "d3-bundler": "~0.4.0", 513 | "faucet": "0.0", 514 | "seedrandom": "2", 515 | "tape": "4", 516 | "uglify-js": "2" 517 | }, 518 | "gitHead": "36d4529080e5c9983dd966b06376476f6d981232", 519 | "bugs": { 520 | "url": "https://github.com/d3/d3-arrays/issues" 521 | }, 522 | "_id": "d3-arrays@0.2.0", 523 | "_shasum": "e425b41f391c92078347641301eecb6c560215ca", 524 | "_from": ".", 525 | "_npmVersion": "3.3.9", 526 | "_nodeVersion": "5.0.0", 527 | "_npmUser": { 528 | "name": "mbostock", 529 | "email": "mbostock@gmail.com" 530 | }, 531 | "maintainers": [ 532 | { 533 | "name": "mbostock", 534 | "email": "mike@ocks.org" 535 | } 536 | ], 537 | "dist": { 538 | "shasum": "e425b41f391c92078347641301eecb6c560215ca", 539 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.2.0.tgz" 540 | }, 541 | "deprecated": "Renamed d3-array (singular).", 542 | "directories": {} 543 | }, 544 | "0.3.0": { 545 | "name": "d3-arrays", 546 | "version": "0.3.0", 547 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 548 | "keywords": [ 549 | "d3", 550 | "nest", 551 | "bisect", 552 | "shuffle", 553 | "array" 554 | ], 555 | "homepage": "https://github.com/d3/d3-arrays", 556 | "license": "BSD-3-Clause", 557 | "author": { 558 | "name": "Mike Bostock", 559 | "url": "http://bost.ocks.org/mike" 560 | }, 561 | "main": "build/arrays.cjs", 562 | "jsnext:main": "index", 563 | "repository": { 564 | "type": "git", 565 | "url": "git+https://github.com/d3/d3-arrays.git" 566 | }, 567 | "scripts": { 568 | "pretest": "mkdir -p build && d3-bundler -x -f cjs -o build/arrays.cjs.js", 569 | "test": "faucet `find test -name '*-test.js'`", 570 | "prepublish": "npm run test && d3-bundler -n arrays -o build/arrays.js && uglifyjs build/arrays.js -c -m -o build/arrays.min.js && rm -f build/arrays.zip && zip -j build/arrays.zip -- LICENSE README.md build/arrays.js build/arrays.min.js" 571 | }, 572 | "devDependencies": { 573 | "d3-bundler": "~0.4.0", 574 | "faucet": "0.0", 575 | "seedrandom": "2", 576 | "tape": "4", 577 | "uglify-js": "2" 578 | }, 579 | "gitHead": "fd136e52fb7f527e2f56788bfa29d6b0cfc314fb", 580 | "bugs": { 581 | "url": "https://github.com/d3/d3-arrays/issues" 582 | }, 583 | "_id": "d3-arrays@0.3.0", 584 | "_shasum": "c81d15bc84255de400ce83b04d8b925ca81b4e6a", 585 | "_from": ".", 586 | "_npmVersion": "3.3.9", 587 | "_nodeVersion": "5.0.0", 588 | "_npmUser": { 589 | "name": "mbostock", 590 | "email": "mbostock@gmail.com" 591 | }, 592 | "maintainers": [ 593 | { 594 | "name": "mbostock", 595 | "email": "mike@ocks.org" 596 | } 597 | ], 598 | "dist": { 599 | "shasum": "c81d15bc84255de400ce83b04d8b925ca81b4e6a", 600 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.3.0.tgz" 601 | }, 602 | "deprecated": "Renamed d3-array (singular).", 603 | "directories": {} 604 | }, 605 | "0.3.1": { 606 | "name": "d3-arrays", 607 | "version": "0.3.1", 608 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 609 | "keywords": [ 610 | "d3", 611 | "nest", 612 | "bisect", 613 | "shuffle", 614 | "array" 615 | ], 616 | "homepage": "https://github.com/d3/d3-arrays", 617 | "license": "BSD-3-Clause", 618 | "author": { 619 | "name": "Mike Bostock", 620 | "url": "http://bost.ocks.org/mike" 621 | }, 622 | "main": "build/d3-arrays.js", 623 | "jsnext:main": "index", 624 | "repository": { 625 | "type": "git", 626 | "url": "git+https://github.com/d3/d3-arrays.git" 627 | }, 628 | "scripts": { 629 | "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 -u d3-arrays -n d3_arrays -o build/d3-arrays.js -- build/bundle.js", 630 | "test": "faucet `find test -name '*-test.js'`", 631 | "prepublish": "npm run test && uglifyjs build/d3-arrays.js -c -m -o build/d3-arrays.min.js && rm -f build/d3-arrays.zip && zip -j build/d3-arrays.zip -- LICENSE README.md build/d3-arrays.js build/d3-arrays.min.js" 632 | }, 633 | "devDependencies": { 634 | "faucet": "0.0", 635 | "rollup": "0.20.5", 636 | "seedrandom": "2", 637 | "tape": "4", 638 | "uglify-js": "2" 639 | }, 640 | "gitHead": "1ca359f657ed4d206536a7752ae737b1b892a1a7", 641 | "bugs": { 642 | "url": "https://github.com/d3/d3-arrays/issues" 643 | }, 644 | "_id": "d3-arrays@0.3.1", 645 | "_shasum": "3975026ff85c4c5e7b8034a4c044acebbd9222d2", 646 | "_from": ".", 647 | "_npmVersion": "3.3.9", 648 | "_nodeVersion": "5.0.0", 649 | "_npmUser": { 650 | "name": "mbostock", 651 | "email": "mbostock@gmail.com" 652 | }, 653 | "maintainers": [ 654 | { 655 | "name": "mbostock", 656 | "email": "mike@ocks.org" 657 | } 658 | ], 659 | "dist": { 660 | "shasum": "3975026ff85c4c5e7b8034a4c044acebbd9222d2", 661 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.3.1.tgz" 662 | }, 663 | "deprecated": "Renamed d3-array (singular).", 664 | "directories": {} 665 | }, 666 | "0.4.0": { 667 | "name": "d3-arrays", 668 | "version": "0.4.0", 669 | "description": "Array manipulation, ordering, searching, summarizing, etc.", 670 | "keywords": [ 671 | "d3", 672 | "nest", 673 | "bisect", 674 | "shuffle", 675 | "array" 676 | ], 677 | "homepage": "https://github.com/d3/d3-arrays", 678 | "license": "BSD-3-Clause", 679 | "author": { 680 | "name": "Mike Bostock", 681 | "url": "http://bost.ocks.org/mike" 682 | }, 683 | "main": "build/d3-arrays.js", 684 | "jsnext:main": "index", 685 | "repository": { 686 | "type": "git", 687 | "url": "git+https://github.com/d3/d3-arrays.git" 688 | }, 689 | "scripts": { 690 | "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 -u d3-arrays -n d3_arrays -o build/d3-arrays.js -- build/bundle.js", 691 | "test": "faucet `find test -name '*-test.js'`", 692 | "prepublish": "npm run test && uglifyjs build/d3-arrays.js -c -m -o build/d3-arrays.min.js && rm -f build/d3-arrays.zip && zip -j build/d3-arrays.zip -- LICENSE README.md build/d3-arrays.js build/d3-arrays.min.js" 693 | }, 694 | "devDependencies": { 695 | "faucet": "0.0", 696 | "rollup": "0.20.5", 697 | "seedrandom": "2", 698 | "tape": "4", 699 | "uglify-js": "2" 700 | }, 701 | "gitHead": "97e363bff70df341116c3fa1b82fb052ad1fdc6e", 702 | "bugs": { 703 | "url": "https://github.com/d3/d3-arrays/issues" 704 | }, 705 | "_id": "d3-arrays@0.4.0", 706 | "_shasum": "24c5dc5373e41d65cdcf43e46292f687550fe528", 707 | "_from": ".", 708 | "_npmVersion": "3.3.9", 709 | "_nodeVersion": "5.0.0", 710 | "_npmUser": { 711 | "name": "mbostock", 712 | "email": "mbostock@gmail.com" 713 | }, 714 | "maintainers": [ 715 | { 716 | "name": "mbostock", 717 | "email": "mike@ocks.org" 718 | } 719 | ], 720 | "dist": { 721 | "shasum": "24c5dc5373e41d65cdcf43e46292f687550fe528", 722 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.4.0.tgz" 723 | }, 724 | "deprecated": "Renamed d3-array (singular).", 725 | "directories": {} 726 | }, 727 | "0.4.1": { 728 | "name": "d3-arrays", 729 | "version": "0.4.1", 730 | "description": "DEPRECATED; renamed to d3-array (singular).", 731 | "keywords": [ 732 | "d3", 733 | "nest", 734 | "bisect", 735 | "shuffle", 736 | "array" 737 | ], 738 | "homepage": "https://github.com/d3/d3-arrays", 739 | "license": "BSD-3-Clause", 740 | "author": { 741 | "name": "Mike Bostock", 742 | "url": "http://bost.ocks.org/mike" 743 | }, 744 | "main": "build/d3-arrays.js", 745 | "jsnext:main": "index", 746 | "repository": { 747 | "type": "git", 748 | "url": "git+https://github.com/d3/d3-arrays.git" 749 | }, 750 | "scripts": { 751 | "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 -u d3-arrays -n d3_arrays -o build/d3-arrays.js -- build/bundle.js", 752 | "test": "faucet `find test -name '*-test.js'`", 753 | "prepublish": "npm run test && uglifyjs build/d3-arrays.js -c -m -o build/d3-arrays.min.js && rm -f build/d3-arrays.zip && zip -j build/d3-arrays.zip -- LICENSE README.md build/d3-arrays.js build/d3-arrays.min.js" 754 | }, 755 | "devDependencies": { 756 | "faucet": "0.0", 757 | "rollup": "0.20.5", 758 | "seedrandom": "2", 759 | "tape": "4", 760 | "uglify-js": "2" 761 | }, 762 | "gitHead": "97e363bff70df341116c3fa1b82fb052ad1fdc6e", 763 | "bugs": { 764 | "url": "https://github.com/d3/d3-arrays/issues" 765 | }, 766 | "_id": "d3-arrays@0.4.1", 767 | "_shasum": "3664b72ecca5b60cf57bb1a771692ed6cf6232a5", 768 | "_from": ".", 769 | "_npmVersion": "3.3.12", 770 | "_nodeVersion": "5.1.0", 771 | "_npmUser": { 772 | "name": "mbostock", 773 | "email": "mbostock@gmail.com" 774 | }, 775 | "maintainers": [ 776 | { 777 | "name": "mbostock", 778 | "email": "mike@ocks.org" 779 | } 780 | ], 781 | "dist": { 782 | "shasum": "3664b72ecca5b60cf57bb1a771692ed6cf6232a5", 783 | "tarball": "https://registry.npmjs.org/d3-arrays/-/d3-arrays-0.4.1.tgz" 784 | }, 785 | "deprecated": "Renamed d3-array (singular).", 786 | "directories": {} 787 | } 788 | }, 789 | "readme": "# d3-arrays\n\nDEPRECATED; renamed to [d3-array](https://github.com/d3/d3-array) (singular).\n", 790 | "maintainers": [ 791 | { 792 | "name": "mbostock", 793 | "email": "mike@ocks.org" 794 | } 795 | ], 796 | "time": { 797 | "modified": "2015-12-09T00:08:09.416Z", 798 | "created": "2014-03-29T21:24:31.300Z", 799 | "0.0.0": "2014-03-29T21:24:31.300Z", 800 | "0.0.1": "2015-06-03T23:10:05.589Z", 801 | "0.0.2": "2015-06-04T21:54:06.784Z", 802 | "0.0.3": "2015-06-08T03:49:35.283Z", 803 | "0.0.4": "2015-06-16T20:50:36.841Z", 804 | "0.1.0": "2015-10-20T21:19:49.630Z", 805 | "0.1.1": "2015-10-20T21:21:33.819Z", 806 | "0.1.2": "2015-11-04T07:13:11.042Z", 807 | "0.2.0": "2015-11-06T20:53:10.128Z", 808 | "0.3.0": "2015-11-07T00:08:48.907Z", 809 | "0.3.1": "2015-11-11T18:50:02.700Z", 810 | "0.4.0": "2015-11-19T22:15:15.324Z", 811 | "0.4.1": "2015-12-09T00:07:02.092Z" 812 | }, 813 | "homepage": "https://github.com/d3/d3-arrays", 814 | "keywords": [ 815 | "d3", 816 | "nest", 817 | "bisect", 818 | "shuffle", 819 | "array" 820 | ], 821 | "repository": { 822 | "type": "git", 823 | "url": "git+https://github.com/d3/d3-arrays.git" 824 | }, 825 | "author": { 826 | "name": "Mike Bostock", 827 | "url": "http://bost.ocks.org/mike" 828 | }, 829 | "bugs": { 830 | "url": "https://github.com/d3/d3-arrays/issues" 831 | }, 832 | "license": "BSD-3-Clause", 833 | "readmeFilename": "README.md", 834 | "users": { 835 | "cmpolis": true, 836 | "jaxelson": true 837 | }, 838 | "_attachments": {} 839 | } -------------------------------------------------------------------------------- /data/d3-collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "d3-collection", 3 | "_rev": "4-6205e50c768f754a2fcdc907c9831828", 4 | "name": "d3-collection", 5 | "description": "Handy data structures for elements keyed by string.", 6 | "dist-tags": { 7 | "latest": "0.2.0" 8 | }, 9 | "versions": { 10 | "0.1.0": { 11 | "name": "d3-collection", 12 | "version": "0.1.0", 13 | "description": "Handy data structures for elements keyed by string.", 14 | "keywords": [ 15 | "d3", 16 | "nest", 17 | "data", 18 | "map", 19 | "set", 20 | "object", 21 | "collection" 22 | ], 23 | "homepage": "https://github.com/d3/d3-collection", 24 | "license": "BSD-3-Clause", 25 | "author": { 26 | "name": "Mike Bostock", 27 | "url": "http://bost.ocks.org/mike" 28 | }, 29 | "main": "build/d3-collection.js", 30 | "jsnext:main": "index", 31 | "repository": { 32 | "type": "git", 33 | "url": "git+https://github.com/d3/d3-collection.git" 34 | }, 35 | "scripts": { 36 | "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 -u d3-collection -n d3_collection -o build/d3-collection.js -- build/bundle.js", 37 | "test": "faucet `find test -name '*-test.js'`", 38 | "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" 39 | }, 40 | "devDependencies": { 41 | "d3-array": "~0.7.0", 42 | "faucet": "0.0", 43 | "rollup": "0.20.5", 44 | "tape": "4", 45 | "uglify-js": "2" 46 | }, 47 | "gitHead": "4ae27f7e8e75968eebde232a254c91779625122a", 48 | "bugs": { 49 | "url": "https://github.com/d3/d3-collection/issues" 50 | }, 51 | "_id": "d3-collection@0.1.0", 52 | "_shasum": "d223d351c57628ffd8e82360d621c69e0b32be64", 53 | "_from": ".", 54 | "_npmVersion": "3.3.12", 55 | "_nodeVersion": "5.1.0", 56 | "_npmUser": { 57 | "name": "mbostock", 58 | "email": "mbostock@gmail.com" 59 | }, 60 | "maintainers": [ 61 | { 62 | "name": "mbostock", 63 | "email": "mbostock@gmail.com" 64 | } 65 | ], 66 | "dist": { 67 | "shasum": "d223d351c57628ffd8e82360d621c69e0b32be64", 68 | "tarball": "https://registry.npmjs.org/d3-collection/-/d3-collection-0.1.0.tgz" 69 | }, 70 | "directories": {} 71 | }, 72 | "0.1.1": { 73 | "name": "d3-collection", 74 | "version": "0.1.1", 75 | "description": "Handy data structures for elements keyed by string.", 76 | "keywords": [ 77 | "d3", 78 | "nest", 79 | "data", 80 | "map", 81 | "set", 82 | "object", 83 | "collection" 84 | ], 85 | "homepage": "https://github.com/d3/d3-collection", 86 | "license": "BSD-3-Clause", 87 | "author": { 88 | "name": "Mike Bostock", 89 | "url": "http://bost.ocks.org/mike" 90 | }, 91 | "main": "build/d3-collection.js", 92 | "jsnext:main": "index", 93 | "repository": { 94 | "type": "git", 95 | "url": "git+https://github.com/d3/d3-collection.git" 96 | }, 97 | "scripts": { 98 | "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 -n d3_collection -o build/d3-collection.js -- build/bundle.js", 99 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 100 | "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", 101 | "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" 102 | }, 103 | "devDependencies": { 104 | "d3-array": "~0.7.0", 105 | "faucet": "0.0", 106 | "rollup": "0.25", 107 | "tape": "4", 108 | "uglify-js": "2" 109 | }, 110 | "gitHead": "455be53d42e831af5d0af00d52d5a4bbe9a2bc24", 111 | "bugs": { 112 | "url": "https://github.com/d3/d3-collection/issues" 113 | }, 114 | "_id": "d3-collection@0.1.1", 115 | "_shasum": "b7b1ee034ef97260a6c0f1a86515f29ed81c0223", 116 | "_from": ".", 117 | "_npmVersion": "3.3.12", 118 | "_nodeVersion": "5.4.0", 119 | "_npmUser": { 120 | "name": "mbostock", 121 | "email": "mbostock@gmail.com" 122 | }, 123 | "maintainers": [ 124 | { 125 | "name": "mbostock", 126 | "email": "mike@ocks.org" 127 | } 128 | ], 129 | "dist": { 130 | "shasum": "b7b1ee034ef97260a6c0f1a86515f29ed81c0223", 131 | "tarball": "https://registry.npmjs.org/d3-collection/-/d3-collection-0.1.1.tgz" 132 | }, 133 | "directories": {} 134 | }, 135 | "0.1.2": { 136 | "name": "d3-collection", 137 | "version": "0.1.2", 138 | "description": "Handy data structures for elements keyed by string.", 139 | "keywords": [ 140 | "d3", 141 | "nest", 142 | "data", 143 | "map", 144 | "set", 145 | "object", 146 | "collection" 147 | ], 148 | "homepage": "https://github.com/d3/d3-collection", 149 | "license": "BSD-3-Clause", 150 | "author": { 151 | "name": "Mike Bostock", 152 | "url": "http://bost.ocks.org/mike" 153 | }, 154 | "main": "build/d3-collection.js", 155 | "jsnext:main": "index", 156 | "repository": { 157 | "type": "git", 158 | "url": "git+https://github.com/d3/d3-collection.git" 159 | }, 160 | "scripts": { 161 | "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 -n d3_collection -o build/d3-collection.js -- build/bundle.js", 162 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 163 | "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", 164 | "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" 165 | }, 166 | "devDependencies": { 167 | "d3-array": "~0.7.0", 168 | "faucet": "0.0", 169 | "rollup": "0.25", 170 | "tape": "4", 171 | "uglify-js": "2" 172 | }, 173 | "gitHead": "02bfd3303446dd2795e8a5b3a9da65c0e0735c28", 174 | "bugs": { 175 | "url": "https://github.com/d3/d3-collection/issues" 176 | }, 177 | "_id": "d3-collection@0.1.2", 178 | "_shasum": "d1495f5720add3835117e1916607d2b05b186c5a", 179 | "_from": ".", 180 | "_npmVersion": "3.5.3", 181 | "_nodeVersion": "5.5.0", 182 | "_npmUser": { 183 | "name": "mbostock", 184 | "email": "mike@ocks.org" 185 | }, 186 | "dist": { 187 | "shasum": "d1495f5720add3835117e1916607d2b05b186c5a", 188 | "tarball": "https://registry.npmjs.org/d3-collection/-/d3-collection-0.1.2.tgz" 189 | }, 190 | "maintainers": [ 191 | { 192 | "name": "mbostock", 193 | "email": "mike@ocks.org" 194 | } 195 | ], 196 | "_npmOperationalInternal": { 197 | "host": "packages-6-west.internal.npmjs.com", 198 | "tmp": "tmp/d3-collection-0.1.2.tgz_1456073681575_0.9819975970312953" 199 | }, 200 | "directories": {} 201 | }, 202 | "0.2.0": { 203 | "name": "d3-collection", 204 | "version": "0.2.0", 205 | "description": "Handy data structures for elements keyed by string.", 206 | "keywords": [ 207 | "d3", 208 | "nest", 209 | "data", 210 | "map", 211 | "set", 212 | "object", 213 | "collection" 214 | ], 215 | "homepage": "https://github.com/d3/d3-collection", 216 | "license": "BSD-3-Clause", 217 | "author": { 218 | "name": "Mike Bostock", 219 | "url": "http://bost.ocks.org/mike" 220 | }, 221 | "main": "build/d3-collection.js", 222 | "jsnext:main": "index", 223 | "repository": { 224 | "type": "git", 225 | "url": "git+https://github.com/d3/d3-collection.git" 226 | }, 227 | "scripts": { 228 | "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", 229 | "test": "tape 'test/**/*-test.js' && eslint index.js src", 230 | "prepublish": "npm run test && uglifyjs build/d3-collection.js -c -m -o build/d3-collection.min.js", 231 | "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" 232 | }, 233 | "devDependencies": { 234 | "d3-array": "~0.7.0", 235 | "eslint": "2", 236 | "json2module": "0.0", 237 | "rollup": "0.26", 238 | "tape": "4", 239 | "uglify-js": "2" 240 | }, 241 | "gitHead": "ced27cf280dfba546fb34c20238a9ed0b698ff92", 242 | "bugs": { 243 | "url": "https://github.com/d3/d3-collection/issues" 244 | }, 245 | "_id": "d3-collection@0.2.0", 246 | "_shasum": "0a7cf362d823f0c65057cc075f4e441c31c300fa", 247 | "_from": ".", 248 | "_npmVersion": "3.8.6", 249 | "_nodeVersion": "6.1.0", 250 | "_npmUser": { 251 | "name": "mbostock", 252 | "email": "mbostock@gmail.com" 253 | }, 254 | "maintainers": [ 255 | { 256 | "name": "mbostock", 257 | "email": "mike@ocks.org" 258 | } 259 | ], 260 | "dist": { 261 | "shasum": "0a7cf362d823f0c65057cc075f4e441c31c300fa", 262 | "tarball": "https://registry.npmjs.org/d3-collection/-/d3-collection-0.2.0.tgz" 263 | }, 264 | "_npmOperationalInternal": { 265 | "host": "packages-12-west.internal.npmjs.com", 266 | "tmp": "tmp/d3-collection-0.2.0.tgz_1463330761637_0.3850678822491318" 267 | }, 268 | "directories": {} 269 | } 270 | }, 271 | "readme": "# d3-collection\n\nHandy data structures for elements keyed by string.\n\n## Installing\n\nIf 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:\n\n```html\n\n\n```\n\n[Try d3-collection in your browser.](https://tonicdev.com/npm/d3-collection)\n\n## API Reference\n\n* [Objects](#objects)\n* [Maps](#maps)\n* [Sets](#sets)\n* [Nests](#nests)\n\n### Objects\n\nA common data type in JavaScript is the *associative array*, or more simply the *object*, which has a set of named properties. The standard mechanism for iterating over the keys (or property names) in an associative array is the [for…in loop](https://developer.mozilla.org/en/JavaScript/Reference/Statements/for...in). However, note that the iteration order is undefined. D3 provides several methods for converting associative arrays to standard arrays with numeric indexes.\n\nA word of caution: it is tempting to use plain objects as maps, but this causes [unexpected behavior](http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/) when built-in property names are used as keys, such as `object[\"__proto__\"] = 42` and `\"hasOwnProperty\" in object`. If you cannot guarantee that map keys and set values will be safe, use [maps](#maps) and [sets](#sets) (or their ES6 equivalents) instead of plain objects.\n\n# d3.keys(object)\n\nReturns an array containing the property names of the specified object (an associative array). The order of the returned array is undefined.\n\n# d3.values(object)\n\nReturns an array containing the property values of the specified object (an associative array). The order of the returned array is undefined.\n\n# d3.entries(object)\n\nReturns an array containing the property keys and values of the specified object (an associative array). Each entry is an object with a key and value attribute, such as `{key: \"foo\", value: 42}`. The order of the returned array is undefined.\n\n```js\nd3.entries({foo: 42, bar: true}); // [{key: \"foo\", value: 42}, {key: \"bar\", value: true}]\n```\n\n### Maps\n\nLike [ES6 Maps](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), but with a few differences:\n\n* Keys are coerced to strings.\n* [map.each](#map_each), not [map.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach). (Also, no *thisArg*.)\n* [map.remove](#map_remove), not [map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete).\n* [map.entries](#map_entries) returns an array of {key, value} objects, not an iterator of [key, value].\n* [map.size](#map_size) is a method, not a [property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size); also, there’s [map.empty](#map_empty).\n\n# d3.map([object[, key]])\n\nConstructs a new map. If *object* is specified, copies all enumerable properties from the specified object into this map. The specified object may also be an array or another map. An optional *key* function may be specified to compute the key for each value in the array. For example:\n\n```js\nvar map = d3.map([{name: \"foo\"}, {name: \"bar\"}], function(d) { return d.name; });\nmap.get(\"foo\"); // {\"name\": \"foo\"}\nmap.get(\"bar\"); // {\"name\": \"bar\"}\nmap.get(\"baz\"); // undefined\n```\n\nSee also [nests](#nests).\n\n# map.has(key)\n\nReturns true if and only if this map has an entry for the specified *key* string. Note: the value may be `null` or `undefined`.\n\n# map.get(key)\n\nReturns the value for the specified *key* string. If the map does not have an entry for the specified *key*, returns `undefined`.\n\n# map.set(key, value)\n\nSets the *value* for the specified *key* string. If the map previously had an entry for the same *key* string, the old entry is replaced with the new value. Returns the map, allowing chaining. For example:\n\n```js\nvar map = d3.map()\n .set(\"foo\", 1)\n .set(\"bar\", 2)\n .set(\"baz\", 3);\n\nmap.get(\"foo\"); // 1\n```\n\n# map.remove(key)\n\nIf the map has an entry for the specified *key* string, removes the entry and returns true. Otherwise, this method does nothing and returns false.\n\n# map.clear()\n\nRemoves all entries from this map.\n\n# map.keys()\n\nReturns an array of string keys for every entry in this map. The order of the returned keys is arbitrary.\n\n# map.values()\n\nReturns an array of values for every entry in this map. The order of the returned values is arbitrary.\n\n# map.entries()\n\nReturns an array of key-value objects for each entry in this map. The order of the returned entries is arbitrary. Each entry’s key is a string, but the value has arbitrary type.\n\n# map.each(function)\n\nCalls the specified *function* for each entry in this map, passing the entry’s value and key as arguments, followed by the map itself. Returns undefined. The iteration order is arbitrary.\n\n# map.empty()\n\nReturns true if and only if this map has zero entries.\n\n# map.size()\n\nReturns the number of entries in this map.\n\n### Sets\n\nLike [ES6 Sets](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), but with a few differences:\n\n* Values are coerced to strings.\n* [set.each](#set_each), not [set.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach). (Also, no *thisArg*.)\n* [set.remove](#set_remove), not [set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete).\n* [set.size](#set_size) is a method, not a [property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/size); also, there’s [set.empty](#set_empty).\n\n# d3.set([array[, accessor]])\n\nConstructs a new set. If *array* is specified, adds the given *array* of string values to the returned set. The specified array may also be another set. An optional *accessor* function may be specified, which is equivalent to calling *array.map(accessor)* before constructing the set.\n\n# set.has(value)\n\nReturns true if and only if this set has an entry for the specified *value* string.\n\n# set.add(value)\n\nAdds the specified *value* string to this set. Returns the set, allowing chaining. For example:\n\n```js\nvar set = d3.set()\n .add(\"foo\")\n .add(\"bar\")\n .add(\"baz\");\n\nset.has(\"foo\"); // true\n```\n\n# set.remove(value)\n\nIf the set contains the specified *value* string, removes it and returns true. Otherwise, this method does nothing and returns false.\n\n# set.clear()\n\nRemoves all values from this set.\n\n# set.values()\n\nReturns an array of the string values in this set. The order of the returned values is arbitrary. Can be used as a convenient way of computing the unique values for a set of strings. For example:\n\n```js\nd3.set([\"foo\", \"bar\", \"foo\", \"baz\"]).values(); // \"foo\", \"bar\", \"baz\"\n```\n\n# set.each(function)\n\nCalls the specified *function* for each value in this set, passing the value as the first two arguments (for symmetry with [*map*.each](#map_each)), followed by the set itself. Returns undefined. The iteration order is arbitrary.\n\n# set.empty()\n\nReturns true if and only if this set has zero values.\n\n# set.size()\n\nReturns the number of values in this set.\n\n### Nests\n\nNesting allows elements in an array to be grouped into a hierarchical tree structure; think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. The levels in the tree are specified by key functions. The leaf nodes of the tree can be sorted by value, while the internal nodes can be sorted by key. An optional rollup function will collapse the elements in each leaf node using a summary function. The nest operator (the object returned by [nest](#nest)) is reusable, and does not retain any references to the data that is nested.\n\nFor example, consider the following tabular data structure of Barley yields, from various sites in Minnesota during 1931-2:\n\n```js\nvar yields = [\n {yield: 27.00, variety: \"Manchuria\", year: 1931, site: \"University Farm\"},\n {yield: 48.87, variety: \"Manchuria\", year: 1931, site: \"Waseca\"},\n {yield: 27.43, variety: \"Manchuria\", year: 1931, site: \"Morris\"},\n ...\n];\n```\n\nTo facilitate visualization, it may be useful to nest the elements first by year, and then by variety, as follows:\n\n```js\nvar entries = d3.nest()\n .key(function(d) { return d.year; })\n .key(function(d) { return d.variety; })\n .entries(yields);\n```\n\nThis returns a nested array. Each element of the outer array is a key-values pair, listing the values for each distinct key:\n\n```js\n[{key: \"1931\", values: [\n {key: \"Manchuria\", values: [\n {yield: 27.00, variety: \"Manchuria\", year: 1931, site: \"University Farm\"},\n {yield: 48.87, variety: \"Manchuria\", year: 1931, site: \"Waseca\"},\n {yield: 27.43, variety: \"Manchuria\", year: 1931, site: \"Morris\"}, ...]},\n {key: \"Glabron\", values: [\n {yield: 43.07, variety: \"Glabron\", year: 1931, site: \"University Farm\"},\n {yield: 55.20, variety: \"Glabron\", year: 1931, site: \"Waseca\"}, ...]}, ...]},\n {key: \"1932\", values: ...}]\n```\n\nThe nested form allows easy iteration and generation of hierarchical structures in SVG or HTML.\n\nFor a longer introduction to nesting, see:\n\n* Phoebe Bright’s [D3 Nest Tutorial and examples](http://bl.ocks.org/phoebebright/raw/3176159/)\n* Shan Carter’s [Mister Nester](http://bl.ocks.org/shancarter/raw/4748131/)\n\n# d3.nest()\n\nCreates a new nest operator. The set of keys is initially empty.\n\n# nest.key(key)\n\nRegisters a new *key* function. The *key* function will be invoked for each element in the input array and must return a string identifier to assign the element to its group. Most often, the function is a simple accessor, such as the year and variety accessors above. (Keys functions are *not* passed the input array index.) Each time a key is registered, it is pushed onto the end of the internal array of keys, and the nest operator applies an additional level of nesting.\n\n# nest.sortKeys(comparator)\n\nSorts key values for the [current key](#nest_key) using the specified *comparator* function, such as [d3.ascending](https://github.com/d3/d3-array#ascending) or [d3.descending](https://github.com/d3/d3-array#descending). If no comparator is specified for the current key, the order in which keys will be returned is undefined. For example, to sort years in ascending order and varieties in descending order:\n\n```js\nvar entries = d3.nest()\n .key(function(d) { return d.year; }).sortKeys(d3.ascending)\n .key(function(d) { return d.variety; }).sortKeys(d3.descending)\n .entries(yields);\n```\n\nNote that this only affects the result of [*nest*.entries](#nest_entries); the order of keys returned by [*nest*.map](#nest_map) and [*nest*.object](#nest_object) is always undefined, regardless of comparator.\n\n# nest.sortValues(comparator)\n\nSorts leaf elements using the specified *comparator* function, such as [d3.ascending](https://github.com/d3/d3-array#ascending) or [d3.descending](https://github.com/d3/d3-array#descending). This is roughly equivalent to sorting the input array before applying the nest operator; however it is typically more efficient as the size of each group is smaller. If no value comparator is specified, elements will be returned in the order they appeared in the input array. This applies to [*nest*.map](#nest_map), [*nest*.entries](#nest_entries) and [*nest*.object](#nest_object).\n\n# nest.rollup(function)\n\nSpecifies a rollup *function* to be applied on each group of leaf elements. The return value of the rollup function will replace the array of leaf values in either the associative array returned by [*nest*.map](#nest_map) or [*nest*.object](#nest_object); for [*nest*.entries](#nest_entries), it replaces the leaf *entry*.values with *entry*.value.\n\n# nest.map(array)\n\nApplies the nest operator to the specified *array*, returning a nested [map](#map). Each entry in the returned map corresponds to a distinct key value returned by the first key function. The entry value depends on the number of registered key functions: if there is an additional key, the value is another map; otherwise, the value is the array of elements filtered from the input *array* that have the given key value. If no keys are defined, returns the input *array*.\n\n# nest.object(array)\n\nApplies the nest operator to the specified *array*, returning a nested object. Each entry in the returned associative array corresponds to a distinct key value returned by the first key function. The entry value depends on the number of registered key functions: if there is an additional key, the value is another associative array; otherwise, the value is the array of elements filtered from the input *array* that have the given key value.\n\nNote: this method is unsafe if any of the keys conflict with built-in JavaScript properties, such as `__proto__`. If you cannot guarantee that the keys will be safe, you should use [nest.map](#nest_map) instead.\n\n# nest.entries(array)\n\nApplies the nest operator to the specified *array*, returning an array of key-values entries. Conceptually, this is similar to applying [*map*.entries](#map_entries) to the associative array returned by [*nest*.map](#nest_map), but it applies to every level of the hierarchy rather than just the first (outermost) level. Each entry in the returned array corresponds to a distinct key value returned by the first key function. The entry value depends on the number of registered key functions: if there is an additional key, the value is another nested array of entries; otherwise, the value is the array of elements filtered from the input *array* that have the given key value.\n", 272 | "maintainers": [ 273 | { 274 | "name": "mbostock", 275 | "email": "mike@ocks.org" 276 | } 277 | ], 278 | "time": { 279 | "modified": "2016-05-15T16:46:05.567Z", 280 | "created": "2016-01-07T20:22:14.235Z", 281 | "0.1.0": "2016-01-07T20:22:14.235Z", 282 | "0.1.1": "2016-01-29T18:15:47.075Z", 283 | "0.1.2": "2016-02-21T16:54:44.515Z", 284 | "0.2.0": "2016-05-15T16:46:05.567Z" 285 | }, 286 | "homepage": "https://github.com/d3/d3-collection", 287 | "keywords": [ 288 | "d3", 289 | "nest", 290 | "data", 291 | "map", 292 | "set", 293 | "object", 294 | "collection" 295 | ], 296 | "repository": { 297 | "type": "git", 298 | "url": "git+https://github.com/d3/d3-collection.git" 299 | }, 300 | "author": { 301 | "name": "Mike Bostock", 302 | "url": "http://bost.ocks.org/mike" 303 | }, 304 | "bugs": { 305 | "url": "https://github.com/d3/d3-collection/issues" 306 | }, 307 | "license": "BSD-3-Clause", 308 | "readmeFilename": "README.md", 309 | "_attachments": {} 310 | } -------------------------------------------------------------------------------- /data/d3-path.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "d3-path", 3 | "_rev": "8-6bc7d2f594e69d2f3719049e5261c2b6", 4 | "name": "d3-path", 5 | "description": "Serialize Canvas path commands to SVG.", 6 | "dist-tags": { 7 | "latest": "0.1.5" 8 | }, 9 | "versions": { 10 | "0.0.1": { 11 | "name": "d3-path", 12 | "version": "0.0.1", 13 | "description": "Serialize Canvas path commands to SVG.", 14 | "keywords": [ 15 | "d3", 16 | "canvas", 17 | "path", 18 | "svg", 19 | "graphics", 20 | "Path2D" 21 | ], 22 | "homepage": "https://github.com/d3/d3-path", 23 | "license": "BSD-3-Clause", 24 | "author": { 25 | "name": "Mike Bostock", 26 | "url": "http://bost.ocks.org/mike" 27 | }, 28 | "main": "build/d3-path.js", 29 | "jsnext:main": "index", 30 | "repository": { 31 | "type": "git", 32 | "url": "git+https://github.com/d3/d3-path.git" 33 | }, 34 | "scripts": { 35 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 36 | "test": "faucet `find test -name '*-test.js'`", 37 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 38 | }, 39 | "devDependencies": { 40 | "faucet": "0.0", 41 | "rollup": "0.20.5", 42 | "tape": "4", 43 | "uglify-js": "2" 44 | }, 45 | "gitHead": "783f7495a87b702254d72620c3731c5f0383d741", 46 | "bugs": { 47 | "url": "https://github.com/d3/d3-path/issues" 48 | }, 49 | "_id": "d3-path@0.0.1", 50 | "_shasum": "5e443cc1b076ed96bce44e3b3c2207527ea71d04", 51 | "_from": ".", 52 | "_npmVersion": "3.3.9", 53 | "_nodeVersion": "5.0.0", 54 | "_npmUser": { 55 | "name": "mbostock", 56 | "email": "mbostock@gmail.com" 57 | }, 58 | "maintainers": [ 59 | { 60 | "name": "mbostock", 61 | "email": "mbostock@gmail.com" 62 | } 63 | ], 64 | "dist": { 65 | "shasum": "5e443cc1b076ed96bce44e3b3c2207527ea71d04", 66 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.0.1.tgz" 67 | }, 68 | "directories": {} 69 | }, 70 | "0.0.2": { 71 | "name": "d3-path", 72 | "version": "0.0.2", 73 | "description": "Serialize Canvas path commands to SVG.", 74 | "keywords": [ 75 | "d3", 76 | "canvas", 77 | "path", 78 | "svg", 79 | "graphics", 80 | "Path2D" 81 | ], 82 | "homepage": "https://github.com/d3/d3-path", 83 | "license": "BSD-3-Clause", 84 | "author": { 85 | "name": "Mike Bostock", 86 | "url": "http://bost.ocks.org/mike" 87 | }, 88 | "main": "build/d3-path.js", 89 | "jsnext:main": "index", 90 | "repository": { 91 | "type": "git", 92 | "url": "git+https://github.com/d3/d3-path.git" 93 | }, 94 | "scripts": { 95 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 96 | "test": "faucet `find test -name '*-test.js'`", 97 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 98 | }, 99 | "devDependencies": { 100 | "faucet": "0.0", 101 | "rollup": "0.20.5", 102 | "tape": "4", 103 | "uglify-js": "2" 104 | }, 105 | "gitHead": "b1e3fabb42e280c89fd87cebab545684d6ae000d", 106 | "bugs": { 107 | "url": "https://github.com/d3/d3-path/issues" 108 | }, 109 | "_id": "d3-path@0.0.2", 110 | "_shasum": "278a63743c0b374856054d53fd64af7210ca2a71", 111 | "_from": ".", 112 | "_npmVersion": "3.3.9", 113 | "_nodeVersion": "5.0.0", 114 | "_npmUser": { 115 | "name": "mbostock", 116 | "email": "mbostock@gmail.com" 117 | }, 118 | "maintainers": [ 119 | { 120 | "name": "mbostock", 121 | "email": "mike@ocks.org" 122 | } 123 | ], 124 | "dist": { 125 | "shasum": "278a63743c0b374856054d53fd64af7210ca2a71", 126 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.0.2.tgz" 127 | }, 128 | "directories": {} 129 | }, 130 | "0.1.0": { 131 | "name": "d3-path", 132 | "version": "0.1.0", 133 | "description": "Serialize Canvas path commands to SVG.", 134 | "keywords": [ 135 | "d3", 136 | "canvas", 137 | "path", 138 | "svg", 139 | "graphics", 140 | "CanvasRenderingContext2D", 141 | "CanvasPathMethods", 142 | "Path2D" 143 | ], 144 | "homepage": "https://github.com/d3/d3-path", 145 | "license": "BSD-3-Clause", 146 | "author": { 147 | "name": "Mike Bostock", 148 | "url": "http://bost.ocks.org/mike" 149 | }, 150 | "main": "build/d3-path.js", 151 | "jsnext:main": "index", 152 | "repository": { 153 | "type": "git", 154 | "url": "git+https://github.com/d3/d3-path.git" 155 | }, 156 | "scripts": { 157 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 158 | "test": "faucet `find test -name '*-test.js'`", 159 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 160 | }, 161 | "devDependencies": { 162 | "faucet": "0.0", 163 | "rollup": "0.20.5", 164 | "tape": "4", 165 | "uglify-js": "2" 166 | }, 167 | "gitHead": "c9467d77893461a10c368648754459a1e59f20c1", 168 | "bugs": { 169 | "url": "https://github.com/d3/d3-path/issues" 170 | }, 171 | "_id": "d3-path@0.1.0", 172 | "_shasum": "6e5470487262b5f4da731c5c6eb5dc2234d366ae", 173 | "_from": ".", 174 | "_npmVersion": "3.3.9", 175 | "_nodeVersion": "5.0.0", 176 | "_npmUser": { 177 | "name": "mbostock", 178 | "email": "mbostock@gmail.com" 179 | }, 180 | "maintainers": [ 181 | { 182 | "name": "mbostock", 183 | "email": "mike@ocks.org" 184 | } 185 | ], 186 | "dist": { 187 | "shasum": "6e5470487262b5f4da731c5c6eb5dc2234d366ae", 188 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.0.tgz" 189 | }, 190 | "directories": {} 191 | }, 192 | "0.1.1": { 193 | "name": "d3-path", 194 | "version": "0.1.1", 195 | "description": "Serialize Canvas path commands to SVG.", 196 | "keywords": [ 197 | "d3", 198 | "canvas", 199 | "path", 200 | "svg", 201 | "graphics", 202 | "CanvasRenderingContext2D", 203 | "CanvasPathMethods", 204 | "Path2D" 205 | ], 206 | "homepage": "https://github.com/d3/d3-path", 207 | "license": "BSD-3-Clause", 208 | "author": { 209 | "name": "Mike Bostock", 210 | "url": "http://bost.ocks.org/mike" 211 | }, 212 | "main": "build/d3-path.js", 213 | "jsnext:main": "index", 214 | "repository": { 215 | "type": "git", 216 | "url": "git+https://github.com/d3/d3-path.git" 217 | }, 218 | "scripts": { 219 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 220 | "test": "faucet `find test -name '*-test.js'`", 221 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 222 | }, 223 | "devDependencies": { 224 | "faucet": "0.0", 225 | "rollup": "0.20.5", 226 | "tape": "4", 227 | "uglify-js": "2" 228 | }, 229 | "gitHead": "940d9120de8bf9c0fb8310f62604f53915c173b2", 230 | "bugs": { 231 | "url": "https://github.com/d3/d3-path/issues" 232 | }, 233 | "_id": "d3-path@0.1.1", 234 | "_shasum": "de508ff7d6e9e7ea3d43bfe2150288b679d3930c", 235 | "_from": ".", 236 | "_npmVersion": "3.3.9", 237 | "_nodeVersion": "5.0.0", 238 | "_npmUser": { 239 | "name": "mbostock", 240 | "email": "mbostock@gmail.com" 241 | }, 242 | "maintainers": [ 243 | { 244 | "name": "mbostock", 245 | "email": "mike@ocks.org" 246 | } 247 | ], 248 | "dist": { 249 | "shasum": "de508ff7d6e9e7ea3d43bfe2150288b679d3930c", 250 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.1.tgz" 251 | }, 252 | "directories": {} 253 | }, 254 | "0.1.2": { 255 | "name": "d3-path", 256 | "version": "0.1.2", 257 | "description": "Serialize Canvas path commands to SVG.", 258 | "keywords": [ 259 | "d3", 260 | "canvas", 261 | "path", 262 | "svg", 263 | "graphics", 264 | "CanvasRenderingContext2D", 265 | "CanvasPathMethods", 266 | "Path2D" 267 | ], 268 | "homepage": "https://github.com/d3/d3-path", 269 | "license": "BSD-3-Clause", 270 | "author": { 271 | "name": "Mike Bostock", 272 | "url": "http://bost.ocks.org/mike" 273 | }, 274 | "main": "build/d3-path.js", 275 | "jsnext:main": "index", 276 | "repository": { 277 | "type": "git", 278 | "url": "git+https://github.com/d3/d3-path.git" 279 | }, 280 | "scripts": { 281 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 282 | "test": "faucet `find test -name '*-test.js'`", 283 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 284 | }, 285 | "devDependencies": { 286 | "faucet": "0.0", 287 | "rollup": "0.20.5", 288 | "tape": "4", 289 | "uglify-js": "2" 290 | }, 291 | "gitHead": "6b77db4ff82511cdce9195596c3c7dbca4bfdc31", 292 | "bugs": { 293 | "url": "https://github.com/d3/d3-path/issues" 294 | }, 295 | "_id": "d3-path@0.1.2", 296 | "_shasum": "0e650d20f6dccb7cb79feaa3534f173c562994fe", 297 | "_from": ".", 298 | "_npmVersion": "3.3.9", 299 | "_nodeVersion": "5.0.0", 300 | "_npmUser": { 301 | "name": "mbostock", 302 | "email": "mbostock@gmail.com" 303 | }, 304 | "maintainers": [ 305 | { 306 | "name": "mbostock", 307 | "email": "mike@ocks.org" 308 | } 309 | ], 310 | "dist": { 311 | "shasum": "0e650d20f6dccb7cb79feaa3534f173c562994fe", 312 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.2.tgz" 313 | }, 314 | "directories": {} 315 | }, 316 | "0.1.3": { 317 | "name": "d3-path", 318 | "version": "0.1.3", 319 | "description": "Serialize Canvas path commands to SVG.", 320 | "keywords": [ 321 | "d3", 322 | "canvas", 323 | "path", 324 | "svg", 325 | "graphics", 326 | "CanvasRenderingContext2D", 327 | "CanvasPathMethods", 328 | "Path2D" 329 | ], 330 | "homepage": "https://github.com/d3/d3-path", 331 | "license": "BSD-3-Clause", 332 | "author": { 333 | "name": "Mike Bostock", 334 | "url": "http://bost.ocks.org/mike" 335 | }, 336 | "main": "build/d3-path.js", 337 | "jsnext:main": "index", 338 | "repository": { 339 | "type": "git", 340 | "url": "git+https://github.com/d3/d3-path.git" 341 | }, 342 | "scripts": { 343 | "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 -u d3-path -n d3_path -o build/d3-path.js -- build/bundle.js", 344 | "test": "faucet `find test -name '*-test.js'`", 345 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" 346 | }, 347 | "devDependencies": { 348 | "faucet": "0.0", 349 | "rollup": "0.20.5", 350 | "tape": "4", 351 | "uglify-js": "2" 352 | }, 353 | "gitHead": "99e5cb6ffc4ce8ba731b6ec71a196c5d70fcf40c", 354 | "bugs": { 355 | "url": "https://github.com/d3/d3-path/issues" 356 | }, 357 | "_id": "d3-path@0.1.3", 358 | "_shasum": "fbc241c4f87d017884a6df6f67d9ef4bea008427", 359 | "_from": ".", 360 | "_npmVersion": "3.3.12", 361 | "_nodeVersion": "5.1.0", 362 | "_npmUser": { 363 | "name": "mbostock", 364 | "email": "mbostock@gmail.com" 365 | }, 366 | "maintainers": [ 367 | { 368 | "name": "mbostock", 369 | "email": "mike@ocks.org" 370 | } 371 | ], 372 | "dist": { 373 | "shasum": "fbc241c4f87d017884a6df6f67d9ef4bea008427", 374 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.3.tgz" 375 | }, 376 | "directories": {} 377 | }, 378 | "0.1.4": { 379 | "name": "d3-path", 380 | "version": "0.1.4", 381 | "description": "Serialize Canvas path commands to SVG.", 382 | "keywords": [ 383 | "d3", 384 | "canvas", 385 | "path", 386 | "svg", 387 | "graphics", 388 | "CanvasRenderingContext2D", 389 | "CanvasPathMethods", 390 | "Path2D" 391 | ], 392 | "homepage": "https://github.com/d3/d3-path", 393 | "license": "BSD-3-Clause", 394 | "author": { 395 | "name": "Mike Bostock", 396 | "url": "http://bost.ocks.org/mike" 397 | }, 398 | "main": "build/d3-path.js", 399 | "jsnext:main": "index", 400 | "repository": { 401 | "type": "git", 402 | "url": "git+https://github.com/d3/d3-path.git" 403 | }, 404 | "scripts": { 405 | "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 -n d3_path -o build/d3-path.js -- build/bundle.js", 406 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 407 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js", 408 | "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-path.js ../d3.github.com/d3-path.v0.1.js && cp build/d3-path.min.js ../d3.github.com/d3-path.v0.1.min.js && cd ../d3.github.com && git add d3-path.v0.1.js d3-path.v0.1.min.js && git commit -m \"d3-path ${VERSION}\" && git push" 409 | }, 410 | "devDependencies": { 411 | "faucet": "0.0", 412 | "rollup": "0.25", 413 | "tape": "4", 414 | "uglify-js": "2" 415 | }, 416 | "gitHead": "a9a3764497c634edb6f13232197dfc2b4f8f73e3", 417 | "bugs": { 418 | "url": "https://github.com/d3/d3-path/issues" 419 | }, 420 | "_id": "d3-path@0.1.4", 421 | "_shasum": "fa49cd64ad335eada065225e1a4d82d7ddcc904d", 422 | "_from": ".", 423 | "_npmVersion": "3.3.12", 424 | "_nodeVersion": "5.4.0", 425 | "_npmUser": { 426 | "name": "mbostock", 427 | "email": "mbostock@gmail.com" 428 | }, 429 | "maintainers": [ 430 | { 431 | "name": "mbostock", 432 | "email": "mike@ocks.org" 433 | } 434 | ], 435 | "dist": { 436 | "shasum": "fa49cd64ad335eada065225e1a4d82d7ddcc904d", 437 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.4.tgz" 438 | }, 439 | "directories": {} 440 | }, 441 | "0.1.5": { 442 | "name": "d3-path", 443 | "version": "0.1.5", 444 | "description": "Serialize Canvas path commands to SVG.", 445 | "keywords": [ 446 | "d3", 447 | "canvas", 448 | "path", 449 | "svg", 450 | "graphics", 451 | "CanvasRenderingContext2D", 452 | "CanvasPathMethods", 453 | "Path2D" 454 | ], 455 | "homepage": "https://github.com/d3/d3-path", 456 | "license": "BSD-3-Clause", 457 | "author": { 458 | "name": "Mike Bostock", 459 | "url": "http://bost.ocks.org/mike" 460 | }, 461 | "main": "build/d3-path.js", 462 | "jsnext:main": "index", 463 | "repository": { 464 | "type": "git", 465 | "url": "git+https://github.com/d3/d3-path.git" 466 | }, 467 | "scripts": { 468 | "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 -n d3_path -o build/d3-path.js -- build/bundle.js", 469 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 470 | "prepublish": "npm run test && uglifyjs build/d3-path.js -c -m -o build/d3-path.min.js && rm -f build/d3-path.zip && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js", 471 | "postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-path.js ../d3.github.com/d3-path.v0.1.js && cp build/d3-path.min.js ../d3.github.com/d3-path.v0.1.min.js && cd ../d3.github.com && git add d3-path.v0.1.js d3-path.v0.1.min.js && git commit -m \"d3-path ${VERSION}\" && git push" 472 | }, 473 | "devDependencies": { 474 | "faucet": "0.0", 475 | "rollup": "0.25", 476 | "tape": "4", 477 | "uglify-js": "2" 478 | }, 479 | "gitHead": "958e2055da18fe61f0055a1cb24e874ab42475f8", 480 | "bugs": { 481 | "url": "https://github.com/d3/d3-path/issues" 482 | }, 483 | "_id": "d3-path@0.1.5", 484 | "_shasum": "7f62e06512786f42e3ba775bb66027afcc855629", 485 | "_from": ".", 486 | "_npmVersion": "3.5.3", 487 | "_nodeVersion": "5.5.0", 488 | "_npmUser": { 489 | "name": "mbostock", 490 | "email": "mike@ocks.org" 491 | }, 492 | "dist": { 493 | "shasum": "7f62e06512786f42e3ba775bb66027afcc855629", 494 | "tarball": "https://registry.npmjs.org/d3-path/-/d3-path-0.1.5.tgz" 495 | }, 496 | "maintainers": [ 497 | { 498 | "name": "mbostock", 499 | "email": "mike@ocks.org" 500 | } 501 | ], 502 | "_npmOperationalInternal": { 503 | "host": "packages-5-east.internal.npmjs.com", 504 | "tmp": "tmp/d3-path-0.1.5.tgz_1456099564542_0.254878788953647" 505 | }, 506 | "directories": {} 507 | } 508 | }, 509 | "readme": "# d3-path\n\nSay you have some code that draws to a 2D canvas:\n\n```js\nfunction drawCircle(context, radius) {\n context.moveTo(radius, 0);\n context.arc(0, 0, radius, 0, 2 * Math.PI);\n}\n```\n\nThe d3-path module lets you take this exact code and additionally render to [SVG](http://www.w3.org/TR/SVG/paths.html). It works by [serializing](#path_toString) [CanvasPathMethods](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls to [SVG path data](http://www.w3.org/TR/SVG/paths.html#PathData). For example:\n\n```js\nvar context = d3.path();\ndrawCircle(context, 40);\npathElement.setAttribute(\"d\", context.toString());\n```\n\nNow code you write once can be used with both Canvas (for performance) and SVG (for convenience). For a practical example, see [d3-shape](https://github.com/d3/d3-shape).\n\n## Installing\n\nIf you use NPM, `npm install d3-path`. Otherwise, download the [latest release](https://github.com/d3/d3-path/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):\n\n```html\n\n```\n\nIn a vanilla environment, a `d3_path` global is exported. [Try d3-path in your browser.](https://tonicdev.com/npm/d3-path)\n\n## API Reference\n\n# d3.path()\n\nConstructs a new path serializer that implements [CanvasPathMethods](http://www.w3.org/TR/2dcontext/#canvaspathmethods).\n\n# path.moveTo(x, y)\n\nMove to the specified point ⟨*x*, *y*⟩. Equivalent to [*context*.moveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-moveto) and SVG’s [“moveto” command](http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands).\n\n# path.closePath()\n\nEnds the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath. Equivalent to [*context*.closePath](http://www.w3.org/TR/2dcontext/#dom-context-2d-closepath) and SVG’s [“closepath” command](http://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand).\n\n# path.lineTo(x, y)\n\nDraws a straight line from the current point to the specified point ⟨*x*, *y*⟩. Equivalent to [*context*.lineTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-lineto) and SVG’s [“lineto” command](http://www.w3.org/TR/SVG/paths.html#PathDataLinetoCommands).\n\n# path.quadraticCurveTo(cpx, cpy, x, y)\n\nDraws a quadratic Bézier segment from the current point to the specified point ⟨*x*, *y*⟩, with the specified control point ⟨*cpx*, *cpy*⟩. Equivalent to [*context*.quadraticCurveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-quadraticcurveto) and SVG’s [quadratic Bézier curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands).\n\n# path.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y)\n\nDraws a cubic Bézier segment from the current point to the specified point ⟨*x*, *y*⟩, with the specified control points ⟨*cpx1*, *cpy1*⟩ and ⟨*cpx2*, *cpy2*⟩. Equivalent to [*context*.bezierCurveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-beziercurveto) and SVG’s [cubic Bézier curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands).\n\n# path.arcTo(x1, y1, x2, y2, radius)\n\nDraws a circular arc segment with the specified *radius* that starts tangent to the line between the current point and the specified point ⟨*x1*, *y1*⟩ and ends tangent to the line between the specified points ⟨*x1*, *y1*⟩ and ⟨*x2*, *y2*⟩. If the first tangent point is not equal to the current point, a straight line is drawn between the current point and the first tangent point. Equivalent to [*context*.arcTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto) and uses SVG’s [elliptical arc curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands).\n\n# path.arc(x, y, radius, startAngle, endAngle[, anticlockwise])\n\nDraws a circular arc segment with the specified center ⟨*x*, *y*⟩, *radius*, *startAngle* and *endAngle*. If *anticlockwise* is true, the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction. If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc. Equivalent to [*context*.arc](http://www.w3.org/TR/2dcontext/#dom-context-2d-arc) and uses SVG’s [elliptical arc curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands).\n\n# path.rect(x, y, w, h)\n\nCreates a new subpath containing just the four points ⟨*x*, *y*⟩, ⟨*x* + *w*, *y*⟩, ⟨*x* + *w*, *y* + *h*⟩, ⟨*x*, *y* + *h*⟩, with those four points connected by straight lines, and then marks the subpath as closed. Equivalent to [*context*.rect](http://www.w3.org/TR/2dcontext/#dom-context-2d-rect) and uses SVG’s [“lineto” commands](http://www.w3.org/TR/SVG/paths.html#PathDataLinetoCommands).\n\n# path.toString()\n\nReturns the string representation of this *path* according to SVG’s [path data specficiation](http://www.w3.org/TR/SVG/paths.html#PathData).\n", 510 | "maintainers": [ 511 | { 512 | "name": "mbostock", 513 | "email": "mike@ocks.org" 514 | } 515 | ], 516 | "time": { 517 | "modified": "2016-02-22T00:06:08.914Z", 518 | "created": "2015-11-11T18:39:28.349Z", 519 | "0.0.1": "2015-11-11T18:39:28.349Z", 520 | "0.0.2": "2015-11-12T20:57:44.978Z", 521 | "0.1.0": "2015-11-19T17:01:51.750Z", 522 | "0.1.1": "2015-11-20T00:14:19.385Z", 523 | "0.1.2": "2015-11-20T18:55:38.693Z", 524 | "0.1.3": "2015-12-18T18:28:08.034Z", 525 | "0.1.4": "2016-01-29T18:25:53.578Z", 526 | "0.1.5": "2016-02-22T00:06:08.914Z" 527 | }, 528 | "homepage": "https://github.com/d3/d3-path", 529 | "keywords": [ 530 | "d3", 531 | "canvas", 532 | "path", 533 | "svg", 534 | "graphics", 535 | "CanvasRenderingContext2D", 536 | "CanvasPathMethods", 537 | "Path2D" 538 | ], 539 | "repository": { 540 | "type": "git", 541 | "url": "git+https://github.com/d3/d3-path.git" 542 | }, 543 | "author": { 544 | "name": "Mike Bostock", 545 | "url": "http://bost.ocks.org/mike" 546 | }, 547 | "bugs": { 548 | "url": "https://github.com/d3/d3-path/issues" 549 | }, 550 | "license": "BSD-3-Clause", 551 | "readmeFilename": "README.md", 552 | "_attachments": {} 553 | } -------------------------------------------------------------------------------- /data/d3-polygon.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "d3-polygon", 3 | "_rev": "8-694763d1f5e164734d776c4f4b56cd0c", 4 | "name": "d3-polygon", 5 | "description": "Operations for two-dimensional polygons.", 6 | "dist-tags": { 7 | "latest": "0.2.1" 8 | }, 9 | "versions": { 10 | "0.0.1": { 11 | "name": "d3-polygon", 12 | "version": "0.0.1", 13 | "description": "Operations for two-dimensional polygons.", 14 | "keywords": [ 15 | "d3", 16 | "graphics" 17 | ], 18 | "homepage": "https://github.com/d3/d3-polygon", 19 | "license": "BSD-3-Clause", 20 | "author": { 21 | "name": "Mike Bostock", 22 | "url": "http://bost.ocks.org/mike" 23 | }, 24 | "main": "build/polygon", 25 | "jsnext:main": "index", 26 | "repository": { 27 | "type": "git", 28 | "url": "git+https://github.com/d3/d3-polygon.git" 29 | }, 30 | "scripts": { 31 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=polygon -- index.js > build/polygon.js", 32 | "test": "faucet `find test -name '*-test.js'`", 33 | "prepublish": "npm run test && uglifyjs build/polygon.js -c -m -o build/polygon.min.js && rm -f build/polygon.zip && zip -j build/polygon.zip -- LICENSE README.md build/polygon.js build/polygon.min.js" 34 | }, 35 | "devDependencies": { 36 | "d3-bundler": "~0.2.5", 37 | "faucet": "0.0", 38 | "tape": "4", 39 | "uglify-js": "2" 40 | }, 41 | "gitHead": "b801b4d257edce674b76209be3f04d2ebd01dcb4", 42 | "bugs": { 43 | "url": "https://github.com/d3/d3-polygon/issues" 44 | }, 45 | "_id": "d3-polygon@0.0.1", 46 | "_shasum": "b799d7d0ff4a606aa47c3c5af5124ee6e5d4bfd6", 47 | "_from": ".", 48 | "_npmVersion": "2.11.2", 49 | "_nodeVersion": "0.12.5", 50 | "_npmUser": { 51 | "name": "mbostock", 52 | "email": "mbostock@gmail.com" 53 | }, 54 | "maintainers": [ 55 | { 56 | "name": "mbostock", 57 | "email": "mbostock@gmail.com" 58 | } 59 | ], 60 | "dist": { 61 | "shasum": "b799d7d0ff4a606aa47c3c5af5124ee6e5d4bfd6", 62 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.0.1.tgz" 63 | }, 64 | "directories": {} 65 | }, 66 | "0.0.2": { 67 | "name": "d3-polygon", 68 | "version": "0.0.2", 69 | "description": "Operations for two-dimensional polygons.", 70 | "keywords": [ 71 | "d3", 72 | "graphics" 73 | ], 74 | "homepage": "https://github.com/d3/d3-polygon", 75 | "license": "BSD-3-Clause", 76 | "author": { 77 | "name": "Mike Bostock", 78 | "url": "http://bost.ocks.org/mike" 79 | }, 80 | "main": "build/polygon.cjs", 81 | "jsnext:main": "index", 82 | "repository": { 83 | "type": "git", 84 | "url": "git+https://github.com/d3/d3-polygon.git" 85 | }, 86 | "scripts": { 87 | "pretest": "mkdir -p build && d3-bundler -x -f cjs -o build/polygon.cjs.js", 88 | "test": "faucet `find test -name '*-test.js'`", 89 | "prepublish": "npm run test && d3-bundler -n polygon -o build/polygon.js && uglifyjs build/polygon.js -c -m -o build/polygon.min.js && rm -f build/polygon.zip && zip -j build/polygon.zip -- LICENSE README.md build/polygon.js build/polygon.min.js" 90 | }, 91 | "devDependencies": { 92 | "d3-bundler": "~0.4.0", 93 | "faucet": "0.0", 94 | "tape": "4", 95 | "uglify-js": "2" 96 | }, 97 | "gitHead": "a8412a5eaf528e3acf9845d791347d465ba13356", 98 | "bugs": { 99 | "url": "https://github.com/d3/d3-polygon/issues" 100 | }, 101 | "_id": "d3-polygon@0.0.2", 102 | "_shasum": "665c1647a4fc2253712c3b8e6d222c2a0ca7c1c7", 103 | "_from": ".", 104 | "_npmVersion": "3.3.9", 105 | "_nodeVersion": "5.0.0", 106 | "_npmUser": { 107 | "name": "mbostock", 108 | "email": "mbostock@gmail.com" 109 | }, 110 | "maintainers": [ 111 | { 112 | "name": "mbostock", 113 | "email": "mike@ocks.org" 114 | } 115 | ], 116 | "dist": { 117 | "shasum": "665c1647a4fc2253712c3b8e6d222c2a0ca7c1c7", 118 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.0.2.tgz" 119 | }, 120 | "directories": {} 121 | }, 122 | "0.0.3": { 123 | "name": "d3-polygon", 124 | "version": "0.0.3", 125 | "description": "Operations for two-dimensional polygons.", 126 | "keywords": [ 127 | "d3", 128 | "graphics" 129 | ], 130 | "homepage": "https://github.com/d3/d3-polygon", 131 | "license": "BSD-3-Clause", 132 | "author": { 133 | "name": "Mike Bostock", 134 | "url": "http://bost.ocks.org/mike" 135 | }, 136 | "main": "build/d3-polygon.js", 137 | "jsnext:main": "index", 138 | "repository": { 139 | "type": "git", 140 | "url": "git+https://github.com/d3/d3-polygon.git" 141 | }, 142 | "scripts": { 143 | "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 -u d3-polygon -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 144 | "test": "faucet `find test -name '*-test.js'`", 145 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js" 146 | }, 147 | "devDependencies": { 148 | "faucet": "0.0", 149 | "rollup": "0.20.5", 150 | "tape": "4", 151 | "uglify-js": "2" 152 | }, 153 | "gitHead": "a970bf7736c4531acb79e4e73777e78ef18a1a88", 154 | "bugs": { 155 | "url": "https://github.com/d3/d3-polygon/issues" 156 | }, 157 | "_id": "d3-polygon@0.0.3", 158 | "_shasum": "46a722147708393421773bcacbe8fef7cf5b9338", 159 | "_from": ".", 160 | "_npmVersion": "3.3.9", 161 | "_nodeVersion": "5.0.0", 162 | "_npmUser": { 163 | "name": "mbostock", 164 | "email": "mbostock@gmail.com" 165 | }, 166 | "maintainers": [ 167 | { 168 | "name": "mbostock", 169 | "email": "mike@ocks.org" 170 | } 171 | ], 172 | "dist": { 173 | "shasum": "46a722147708393421773bcacbe8fef7cf5b9338", 174 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.0.3.tgz" 175 | }, 176 | "directories": {} 177 | }, 178 | "0.0.4": { 179 | "name": "d3-polygon", 180 | "version": "0.0.4", 181 | "description": "Operations for two-dimensional polygons.", 182 | "keywords": [ 183 | "d3", 184 | "graphics" 185 | ], 186 | "homepage": "https://github.com/d3/d3-polygon", 187 | "license": "BSD-3-Clause", 188 | "author": { 189 | "name": "Mike Bostock", 190 | "url": "http://bost.ocks.org/mike" 191 | }, 192 | "main": "build/d3-polygon.js", 193 | "jsnext:main": "index", 194 | "repository": { 195 | "type": "git", 196 | "url": "git+https://github.com/d3/d3-polygon.git" 197 | }, 198 | "scripts": { 199 | "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 -u d3-polygon -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 200 | "test": "faucet `find test -name '*-test.js'`", 201 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js" 202 | }, 203 | "devDependencies": { 204 | "faucet": "0.0", 205 | "rollup": "0.20.5", 206 | "tape": "4", 207 | "uglify-js": "2" 208 | }, 209 | "gitHead": "a1d20924288b8258a536363f45f4bd75dcae6f47", 210 | "bugs": { 211 | "url": "https://github.com/d3/d3-polygon/issues" 212 | }, 213 | "_id": "d3-polygon@0.0.4", 214 | "_shasum": "636cf10c1efd94839399bc6b8379e46d36343200", 215 | "_from": ".", 216 | "_npmVersion": "3.3.12", 217 | "_nodeVersion": "5.1.0", 218 | "_npmUser": { 219 | "name": "mbostock", 220 | "email": "mbostock@gmail.com" 221 | }, 222 | "maintainers": [ 223 | { 224 | "name": "mbostock", 225 | "email": "mike@ocks.org" 226 | } 227 | ], 228 | "dist": { 229 | "shasum": "636cf10c1efd94839399bc6b8379e46d36343200", 230 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.0.4.tgz" 231 | }, 232 | "directories": {} 233 | }, 234 | "0.0.5": { 235 | "name": "d3-polygon", 236 | "version": "0.0.5", 237 | "description": "Operations for two-dimensional polygons.", 238 | "keywords": [ 239 | "d3", 240 | "graphics" 241 | ], 242 | "homepage": "https://github.com/d3/d3-polygon", 243 | "license": "BSD-3-Clause", 244 | "author": { 245 | "name": "Mike Bostock", 246 | "url": "http://bost.ocks.org/mike" 247 | }, 248 | "main": "build/d3-polygon.js", 249 | "jsnext:main": "index", 250 | "repository": { 251 | "type": "git", 252 | "url": "git+https://github.com/d3/d3-polygon.git" 253 | }, 254 | "scripts": { 255 | "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 -u d3-polygon -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 256 | "test": "faucet `find test -name '*-test.js'`", 257 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js" 258 | }, 259 | "devDependencies": { 260 | "faucet": "0.0", 261 | "rollup": "0.20.5", 262 | "tape": "4", 263 | "uglify-js": "2" 264 | }, 265 | "gitHead": "6f4b63916dd9195b9aedf730a97942c63322cb69", 266 | "bugs": { 267 | "url": "https://github.com/d3/d3-polygon/issues" 268 | }, 269 | "_id": "d3-polygon@0.0.5", 270 | "_shasum": "de786e7d0041a3c4d2e3f73a534407b050578fc2", 271 | "_from": ".", 272 | "_npmVersion": "3.3.12", 273 | "_nodeVersion": "5.1.0", 274 | "_npmUser": { 275 | "name": "mbostock", 276 | "email": "mbostock@gmail.com" 277 | }, 278 | "maintainers": [ 279 | { 280 | "name": "mbostock", 281 | "email": "mike@ocks.org" 282 | } 283 | ], 284 | "dist": { 285 | "shasum": "de786e7d0041a3c4d2e3f73a534407b050578fc2", 286 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.0.5.tgz" 287 | }, 288 | "directories": {} 289 | }, 290 | "0.1.0": { 291 | "name": "d3-polygon", 292 | "version": "0.1.0", 293 | "description": "Operations for two-dimensional polygons.", 294 | "keywords": [ 295 | "d3", 296 | "graphics" 297 | ], 298 | "homepage": "https://github.com/d3/d3-polygon", 299 | "license": "BSD-3-Clause", 300 | "author": { 301 | "name": "Mike Bostock", 302 | "url": "http://bost.ocks.org/mike" 303 | }, 304 | "main": "build/d3-polygon.js", 305 | "jsnext:main": "index", 306 | "repository": { 307 | "type": "git", 308 | "url": "git+https://github.com/d3/d3-polygon.git" 309 | }, 310 | "scripts": { 311 | "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 -u d3-polygon -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 312 | "test": "faucet `find test -name '*-test.js'`", 313 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js" 314 | }, 315 | "devDependencies": { 316 | "faucet": "0.0", 317 | "rollup": "0.20.5", 318 | "tape": "4", 319 | "uglify-js": "2" 320 | }, 321 | "gitHead": "7847f783c8fbba4f4adeb36bb281681347fe46d4", 322 | "bugs": { 323 | "url": "https://github.com/d3/d3-polygon/issues" 324 | }, 325 | "_id": "d3-polygon@0.1.0", 326 | "_shasum": "4421f4eb60a321ec067ea07a4d614080548612ba", 327 | "_from": ".", 328 | "_npmVersion": "3.3.12", 329 | "_nodeVersion": "5.1.0", 330 | "_npmUser": { 331 | "name": "mbostock", 332 | "email": "mbostock@gmail.com" 333 | }, 334 | "maintainers": [ 335 | { 336 | "name": "mbostock", 337 | "email": "mike@ocks.org" 338 | } 339 | ], 340 | "dist": { 341 | "shasum": "4421f4eb60a321ec067ea07a4d614080548612ba", 342 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.1.0.tgz" 343 | }, 344 | "directories": {} 345 | }, 346 | "0.2.0": { 347 | "name": "d3-polygon", 348 | "version": "0.2.0", 349 | "description": "Operations for two-dimensional polygons.", 350 | "keywords": [ 351 | "d3", 352 | "polygon", 353 | "hull", 354 | "geometry", 355 | "graphics" 356 | ], 357 | "homepage": "https://github.com/d3/d3-polygon", 358 | "license": "BSD-3-Clause", 359 | "author": { 360 | "name": "Mike Bostock", 361 | "url": "http://bost.ocks.org/mike" 362 | }, 363 | "main": "build/d3-polygon.js", 364 | "jsnext:main": "index", 365 | "repository": { 366 | "type": "git", 367 | "url": "git+https://github.com/d3/d3-polygon.git" 368 | }, 369 | "scripts": { 370 | "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 -u d3-polygon -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 371 | "test": "faucet `find test -name '*-test.js'`", 372 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js" 373 | }, 374 | "devDependencies": { 375 | "faucet": "0.0", 376 | "rollup": "0.20.5", 377 | "tape": "4", 378 | "uglify-js": "2" 379 | }, 380 | "gitHead": "47af8c9119a7f93ba501af62a7a861c29cd13d45", 381 | "bugs": { 382 | "url": "https://github.com/d3/d3-polygon/issues" 383 | }, 384 | "_id": "d3-polygon@0.2.0", 385 | "_shasum": "1627d0aa8392d5565f26685a62f9b14dd3db2c0f", 386 | "_from": ".", 387 | "_npmVersion": "3.3.12", 388 | "_nodeVersion": "5.1.0", 389 | "_npmUser": { 390 | "name": "mbostock", 391 | "email": "mike@ocks.org" 392 | }, 393 | "dist": { 394 | "shasum": "1627d0aa8392d5565f26685a62f9b14dd3db2c0f", 395 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.2.0.tgz" 396 | }, 397 | "maintainers": [ 398 | { 399 | "name": "mbostock", 400 | "email": "mike@ocks.org" 401 | } 402 | ], 403 | "directories": {} 404 | }, 405 | "0.2.1": { 406 | "name": "d3-polygon", 407 | "version": "0.2.1", 408 | "description": "Operations for two-dimensional polygons.", 409 | "keywords": [ 410 | "d3", 411 | "polygon", 412 | "hull", 413 | "geometry", 414 | "graphics" 415 | ], 416 | "homepage": "https://github.com/d3/d3-polygon", 417 | "license": "BSD-3-Clause", 418 | "author": { 419 | "name": "Mike Bostock", 420 | "url": "http://bost.ocks.org/mike" 421 | }, 422 | "main": "build/d3-polygon.js", 423 | "jsnext:main": "index", 424 | "repository": { 425 | "type": "git", 426 | "url": "git+https://github.com/d3/d3-polygon.git" 427 | }, 428 | "scripts": { 429 | "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 -n d3_polygon -o build/d3-polygon.js -- build/bundle.js", 430 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 431 | "prepublish": "npm run test && uglifyjs build/d3-polygon.js -c -m -o build/d3-polygon.min.js && rm -f build/d3-polygon.zip && zip -j build/d3-polygon.zip -- LICENSE README.md build/d3-polygon.js build/d3-polygon.min.js", 432 | "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-polygon.js ../d3.github.com/d3-polygon.v0.2.js && cp build/d3-polygon.min.js ../d3.github.com/d3-polygon.v0.2.min.js && cd ../d3.github.com && git add d3-polygon.v0.2.js d3-polygon.v0.2.min.js && git commit -m \"d3-polygon ${VERSION}\" && git push" 433 | }, 434 | "devDependencies": { 435 | "faucet": "0.0", 436 | "rollup": "0.25", 437 | "tape": "4", 438 | "uglify-js": "2" 439 | }, 440 | "gitHead": "82707afe6884cdb1a8483f475d6bdadbb515b9cf", 441 | "bugs": { 442 | "url": "https://github.com/d3/d3-polygon/issues" 443 | }, 444 | "_id": "d3-polygon@0.2.1", 445 | "_shasum": "b03f3ca4f9cc282c2d18546e4f2140547070fcd1", 446 | "_from": ".", 447 | "_npmVersion": "3.3.12", 448 | "_nodeVersion": "5.4.0", 449 | "_npmUser": { 450 | "name": "mbostock", 451 | "email": "mbostock@gmail.com" 452 | }, 453 | "maintainers": [ 454 | { 455 | "name": "mbostock", 456 | "email": "mike@ocks.org" 457 | } 458 | ], 459 | "dist": { 460 | "shasum": "b03f3ca4f9cc282c2d18546e4f2140547070fcd1", 461 | "tarball": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-0.2.1.tgz" 462 | }, 463 | "directories": {} 464 | } 465 | }, 466 | "readme": "# d3-polygon\n\nThis module provides a few basic geometric operations for two-dimensional polygons. Each polygon is represented as an array of two-element arrays [​[x1, y1], [x2, y2], …], and may either be closed (wherein the first and last point are the same) or open (wherein they are not). Typically polygons are in counterclockwise order, assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner.\n\n## Installing\n\nIf you use NPM, `npm install d3-polygon`. Otherwise, download the [latest release](https://github.com/d3/d3-polygon/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):\n\n```html\n\n```\n\nIn a vanilla environment, a `d3_polygon` global is exported. [Try d3-polygon in your browser.](https://tonicdev.com/npm/d3-polygon)\n\n## API Reference\n\n# d3.polygonArea(polygon)\n\nReturns the signed area of the specified *polygon*. If the vertices of the polygon are in counterclockwise order (assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; otherwise it is negative, or zero.\n\n# d3.polygonCentroid(polygon)\n\nReturns the [centroid](https://en.wikipedia.org/wiki/Centroid) of the specified *polygon*.\n\n# d3.polygonHull(points)\n\n\n\nReturns the [convex hull](https://en.wikipedia.org/wiki/Convex_hull) of the specified *points* using [Andrew’s monotone chain algorithm](http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain). The returned hull is represented as an array containing a subset of the input *points* arranged in counterclockwise order. Returns null if *points* has fewer than three elements.\n\n# d3.polygonContains(polygon, point)\n\nReturns true if and only if the specified *point* is [inside the specified *polygon*](https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html).\n\n# d3.polygonLength(polygon)\n\nReturns the length of the perimeter of the specified *polygon*.\n", 467 | "maintainers": [ 468 | { 469 | "name": "mbostock", 470 | "email": "mike@ocks.org" 471 | } 472 | ], 473 | "time": { 474 | "modified": "2016-01-29T18:26:51.553Z", 475 | "created": "2015-07-07T03:40:17.870Z", 476 | "0.0.1": "2015-07-07T03:40:17.870Z", 477 | "0.0.2": "2015-11-04T07:34:34.649Z", 478 | "0.0.3": "2015-11-11T19:18:44.473Z", 479 | "0.0.4": "2015-12-08T18:02:30.389Z", 480 | "0.0.5": "2015-12-08T18:40:14.437Z", 481 | "0.1.0": "2015-12-18T22:52:17.729Z", 482 | "0.2.0": "2016-01-11T19:08:09.675Z", 483 | "0.2.1": "2016-01-29T18:26:51.553Z" 484 | }, 485 | "homepage": "https://github.com/d3/d3-polygon", 486 | "keywords": [ 487 | "d3", 488 | "polygon", 489 | "hull", 490 | "geometry", 491 | "graphics" 492 | ], 493 | "repository": { 494 | "type": "git", 495 | "url": "git+https://github.com/d3/d3-polygon.git" 496 | }, 497 | "author": { 498 | "name": "Mike Bostock", 499 | "url": "http://bost.ocks.org/mike" 500 | }, 501 | "bugs": { 502 | "url": "https://github.com/d3/d3-polygon/issues" 503 | }, 504 | "license": "BSD-3-Clause", 505 | "readmeFilename": "README.md", 506 | "_attachments": {} 507 | } -------------------------------------------------------------------------------- /data/d3-random.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "d3-random", 3 | "_rev": "12-9fa2db5311e6fc855b9ca2a580645c8a", 4 | "name": "d3-random", 5 | "description": "Generate random numbers from various distributions.", 6 | "dist-tags": { 7 | "latest": "0.2.1" 8 | }, 9 | "versions": { 10 | "0.0.0": { 11 | "name": "d3-random", 12 | "version": "0.0.0", 13 | "description": "The d3.random function from d3", 14 | "main": "index.js", 15 | "scripts": { 16 | "build": "smash node_modules/d3/src/start.js node_modules/d3/src/math/random.js node_modules/d3/src/end.js | uglifyjs - -b -indent-level=2 -o index.js", 17 | "test": "echo \"Error: no test specified\" && exit 1" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/jfsiii/d3-random.git" 22 | }, 23 | "keywords": [ 24 | "d3" 25 | ], 26 | "author": { 27 | "name": "JFSIII" 28 | }, 29 | "license": "ISC", 30 | "devDependencies": { 31 | "d3": "^3.4.4", 32 | "smash": "0.0.12", 33 | "uglify-js": "^2.4.13" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/jfsiii/d3-random/issues" 37 | }, 38 | "homepage": "https://github.com/jfsiii/d3-random", 39 | "_id": "d3-random@0.0.0", 40 | "dist": { 41 | "shasum": "d9a7a2e3c2a971236e89f3595f15f971c952ef43", 42 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.0.0.tgz" 43 | }, 44 | "_from": ".", 45 | "_npmVersion": "1.4.6", 46 | "_npmUser": { 47 | "name": "jfsiii", 48 | "email": "npmjs.org@JFSIII.org" 49 | }, 50 | "maintainers": [ 51 | { 52 | "name": "jfsiii", 53 | "email": "npmjs.org@JFSIII.org" 54 | } 55 | ], 56 | "directories": {} 57 | }, 58 | "0.0.1": { 59 | "name": "d3-random", 60 | "version": "0.0.1", 61 | "description": "Generate random numbers from various distributions.", 62 | "keywords": [ 63 | "d3", 64 | "random", 65 | "rng" 66 | ], 67 | "homepage": "https://github.com/d3/d3-random", 68 | "license": "BSD-3-Clause", 69 | "author": { 70 | "name": "Mike Bostock", 71 | "url": "http://bost.ocks.org/mike" 72 | }, 73 | "main": "build/random", 74 | "jsnext:main": "index", 75 | "repository": { 76 | "type": "git", 77 | "url": "https://github.com/d3/d3-random.git" 78 | }, 79 | "scripts": { 80 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=random -- index.js > build/random.js", 81 | "test": "faucet `find test -name '*-test.js'`", 82 | "prepublish": "npm run test && uglifyjs build/random.js -c -m -o build/random.min.js" 83 | }, 84 | "devDependencies": { 85 | "d3-arrays": "~0.0.3", 86 | "d3-bundler": "~0.2.6", 87 | "faucet": "0.0", 88 | "seedrandom": "2", 89 | "tape": "4", 90 | "uglifyjs": "2" 91 | }, 92 | "gitHead": "65462ceebe4ef55ecc4047b10bf5bfc4305240c5", 93 | "bugs": { 94 | "url": "https://github.com/d3/d3-random/issues" 95 | }, 96 | "_id": "d3-random@0.0.1", 97 | "_shasum": "97db085390c3516f078bede09ac05863d8fce7d3", 98 | "_from": ".", 99 | "_npmVersion": "2.7.5", 100 | "_nodeVersion": "0.12.2", 101 | "_npmUser": { 102 | "name": "mbostock", 103 | "email": "mike@ocks.org" 104 | }, 105 | "dist": { 106 | "shasum": "97db085390c3516f078bede09ac05863d8fce7d3", 107 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.0.1.tgz" 108 | }, 109 | "maintainers": [ 110 | { 111 | "name": "mbostock", 112 | "email": "mike@ocks.org" 113 | } 114 | ], 115 | "directories": {} 116 | }, 117 | "0.0.2": { 118 | "name": "d3-random", 119 | "version": "0.0.2", 120 | "description": "Generate random numbers from various distributions.", 121 | "keywords": [ 122 | "d3", 123 | "random", 124 | "rng" 125 | ], 126 | "homepage": "https://github.com/d3/d3-random", 127 | "license": "BSD-3-Clause", 128 | "author": { 129 | "name": "Mike Bostock", 130 | "url": "http://bost.ocks.org/mike" 131 | }, 132 | "main": "build/random", 133 | "jsnext:main": "index", 134 | "repository": { 135 | "type": "git", 136 | "url": "https://github.com/d3/d3-random.git" 137 | }, 138 | "scripts": { 139 | "pretest": "mkdir -p build && d3-bundler --format=umd --name=random -- index.js > build/random.js", 140 | "test": "faucet `find test -name '*-test.js'`", 141 | "prepublish": "npm run test && uglifyjs build/random.js -c -m -o build/random.min.js && rm -f build/random.zip && zip -j build/random.zip -- LICENSE README.md build/random.js build/random.min.js" 142 | }, 143 | "devDependencies": { 144 | "d3-arrays": "~0.0.3", 145 | "d3-bundler": "~0.2.6", 146 | "faucet": "0.0", 147 | "seedrandom": "2", 148 | "tape": "4", 149 | "uglifyjs": "2" 150 | }, 151 | "gitHead": "84b5577a60363d67276c44a5e6a24cf2377f9222", 152 | "bugs": { 153 | "url": "https://github.com/d3/d3-random/issues" 154 | }, 155 | "_id": "d3-random@0.0.2", 156 | "_shasum": "0a70161e3ce7addd3c0c8d1dcd312329b1b9dd16", 157 | "_from": ".", 158 | "_npmVersion": "2.7.5", 159 | "_nodeVersion": "0.12.2", 160 | "_npmUser": { 161 | "name": "mbostock", 162 | "email": "mbostock@gmail.com" 163 | }, 164 | "maintainers": [ 165 | { 166 | "name": "mbostock", 167 | "email": "mike@ocks.org" 168 | } 169 | ], 170 | "dist": { 171 | "shasum": "0a70161e3ce7addd3c0c8d1dcd312329b1b9dd16", 172 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.0.2.tgz" 173 | }, 174 | "directories": {} 175 | }, 176 | "0.0.3": { 177 | "name": "d3-random", 178 | "version": "0.0.3", 179 | "description": "Generate random numbers from various distributions.", 180 | "keywords": [ 181 | "d3", 182 | "random", 183 | "rng" 184 | ], 185 | "homepage": "https://github.com/d3/d3-random", 186 | "license": "BSD-3-Clause", 187 | "author": { 188 | "name": "Mike Bostock", 189 | "url": "http://bost.ocks.org/mike" 190 | }, 191 | "main": "build/random.cjs", 192 | "jsnext:main": "index", 193 | "repository": { 194 | "type": "git", 195 | "url": "git+https://github.com/d3/d3-random.git" 196 | }, 197 | "scripts": { 198 | "pretest": "mkdir -p build && d3-bundler -x -f cjs -o build/random.cjs.js", 199 | "test": "faucet `find test -name '*-test.js'`", 200 | "prepublish": "npm run test && d3-bundler -n random -o build/random.js && uglifyjs build/random.js -c -m -o build/random.min.js && rm -f build/random.zip && zip -j build/random.zip -- LICENSE README.md build/random.js build/random.min.js" 201 | }, 202 | "devDependencies": { 203 | "d3-arrays": "~0.1.2", 204 | "d3-bundler": "~0.4.0", 205 | "faucet": "0.0", 206 | "seedrandom": "2", 207 | "tape": "4", 208 | "uglify-js": "2" 209 | }, 210 | "gitHead": "074921655bdce791d5ac82cb6ca122082c06b566", 211 | "bugs": { 212 | "url": "https://github.com/d3/d3-random/issues" 213 | }, 214 | "_id": "d3-random@0.0.3", 215 | "_shasum": "a4e60a45c21b4ad91e45d28a0a6d7f65b2668e2b", 216 | "_from": ".", 217 | "_npmVersion": "3.3.9", 218 | "_nodeVersion": "5.0.0", 219 | "_npmUser": { 220 | "name": "mbostock", 221 | "email": "mbostock@gmail.com" 222 | }, 223 | "maintainers": [ 224 | { 225 | "name": "mbostock", 226 | "email": "mike@ocks.org" 227 | } 228 | ], 229 | "dist": { 230 | "shasum": "a4e60a45c21b4ad91e45d28a0a6d7f65b2668e2b", 231 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.0.3.tgz" 232 | }, 233 | "directories": {} 234 | }, 235 | "0.0.4": { 236 | "name": "d3-random", 237 | "version": "0.0.4", 238 | "description": "Generate random numbers from various distributions.", 239 | "keywords": [ 240 | "d3", 241 | "random", 242 | "rng" 243 | ], 244 | "homepage": "https://github.com/d3/d3-random", 245 | "license": "BSD-3-Clause", 246 | "author": { 247 | "name": "Mike Bostock", 248 | "url": "http://bost.ocks.org/mike" 249 | }, 250 | "main": "build/d3-random.js", 251 | "jsnext:main": "index", 252 | "repository": { 253 | "type": "git", 254 | "url": "git+https://github.com/d3/d3-random.git" 255 | }, 256 | "scripts": { 257 | "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 -u d3-random -n d3_random -o build/d3-random.js -- build/bundle.js", 258 | "test": "faucet `find test -name '*-test.js'`", 259 | "prepublish": "npm run test && uglifyjs build/d3-random.js -c -m -o build/d3-random.min.js && rm -f build/d3-random.zip && zip -j build/d3-random.zip -- LICENSE README.md build/d3-random.js build/d3-random.min.js" 260 | }, 261 | "devDependencies": { 262 | "d3-arrays": "~0.3.1", 263 | "faucet": "0.0", 264 | "rollup": "0.20.5", 265 | "seedrandom": "2", 266 | "tape": "4", 267 | "uglify-js": "2" 268 | }, 269 | "gitHead": "4aea1b716f4da2a1f83fc532401e242ad1b3cecd", 270 | "bugs": { 271 | "url": "https://github.com/d3/d3-random/issues" 272 | }, 273 | "_id": "d3-random@0.0.4", 274 | "_shasum": "99c95d9c3ed6f390f978b2a404bd2ee627adca83", 275 | "_from": ".", 276 | "_npmVersion": "3.3.9", 277 | "_nodeVersion": "5.0.0", 278 | "_npmUser": { 279 | "name": "mbostock", 280 | "email": "mbostock@gmail.com" 281 | }, 282 | "maintainers": [ 283 | { 284 | "name": "mbostock", 285 | "email": "mike@ocks.org" 286 | } 287 | ], 288 | "dist": { 289 | "shasum": "99c95d9c3ed6f390f978b2a404bd2ee627adca83", 290 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.0.4.tgz" 291 | }, 292 | "directories": {} 293 | }, 294 | "0.1.0": { 295 | "name": "d3-random", 296 | "version": "0.1.0", 297 | "description": "Generate random numbers from various distributions.", 298 | "keywords": [ 299 | "d3", 300 | "random", 301 | "rng" 302 | ], 303 | "homepage": "https://github.com/d3/d3-random", 304 | "license": "BSD-3-Clause", 305 | "author": { 306 | "name": "Mike Bostock", 307 | "url": "http://bost.ocks.org/mike" 308 | }, 309 | "main": "build/d3-random.js", 310 | "jsnext:main": "index", 311 | "repository": { 312 | "type": "git", 313 | "url": "git+https://github.com/d3/d3-random.git" 314 | }, 315 | "scripts": { 316 | "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 -u d3-random -n d3_random -o build/d3-random.js -- build/bundle.js", 317 | "test": "faucet `find test -name '*-test.js'`", 318 | "prepublish": "npm run test && uglifyjs build/d3-random.js -c -m -o build/d3-random.min.js && rm -f build/d3-random.zip && zip -j build/d3-random.zip -- LICENSE README.md build/d3-random.js build/d3-random.min.js" 319 | }, 320 | "devDependencies": { 321 | "d3-arrays": "~0.3.1", 322 | "faucet": "0.0", 323 | "rollup": "0.20.5", 324 | "seedrandom": "2", 325 | "tape": "4", 326 | "uglify-js": "2" 327 | }, 328 | "gitHead": "ba98775792093b2abd5be8d693e6459188e8fe6c", 329 | "bugs": { 330 | "url": "https://github.com/d3/d3-random/issues" 331 | }, 332 | "_id": "d3-random@0.1.0", 333 | "_shasum": "fab7aa3f34d87d96990b7a6c9a0620601044eb90", 334 | "_from": ".", 335 | "_npmVersion": "3.3.9", 336 | "_nodeVersion": "5.0.0", 337 | "_npmUser": { 338 | "name": "mbostock", 339 | "email": "mbostock@gmail.com" 340 | }, 341 | "maintainers": [ 342 | { 343 | "name": "mbostock", 344 | "email": "mike@ocks.org" 345 | } 346 | ], 347 | "dist": { 348 | "shasum": "fab7aa3f34d87d96990b7a6c9a0620601044eb90", 349 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.1.0.tgz" 350 | }, 351 | "directories": {} 352 | }, 353 | "0.1.1": { 354 | "name": "d3-random", 355 | "version": "0.1.1", 356 | "description": "Generate random numbers from various distributions.", 357 | "keywords": [ 358 | "d3", 359 | "random", 360 | "rng" 361 | ], 362 | "homepage": "https://github.com/d3/d3-random", 363 | "license": "BSD-3-Clause", 364 | "author": { 365 | "name": "Mike Bostock", 366 | "url": "http://bost.ocks.org/mike" 367 | }, 368 | "main": "build/d3-random.js", 369 | "jsnext:main": "index", 370 | "repository": { 371 | "type": "git", 372 | "url": "git+https://github.com/d3/d3-random.git" 373 | }, 374 | "scripts": { 375 | "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 -u d3-random -n d3_random -o build/d3-random.js -- build/bundle.js", 376 | "test": "faucet `find test -name '*-test.js'`", 377 | "prepublish": "npm run test && uglifyjs build/d3-random.js -c -m -o build/d3-random.min.js && rm -f build/d3-random.zip && zip -j build/d3-random.zip -- LICENSE README.md build/d3-random.js build/d3-random.min.js" 378 | }, 379 | "devDependencies": { 380 | "d3-array": "~0.6.1", 381 | "faucet": "0.0", 382 | "rollup": "0.20.5", 383 | "seedrandom": "2", 384 | "tape": "4", 385 | "uglify-js": "2" 386 | }, 387 | "gitHead": "c74f2e2370f87f9af047e31eb39ab9b7c816965b", 388 | "bugs": { 389 | "url": "https://github.com/d3/d3-random/issues" 390 | }, 391 | "_id": "d3-random@0.1.1", 392 | "_shasum": "6f68342c0f585eb8cb67bcd60b21dca846985614", 393 | "_from": ".", 394 | "_npmVersion": "3.3.12", 395 | "_nodeVersion": "5.1.0", 396 | "_npmUser": { 397 | "name": "mbostock", 398 | "email": "mbostock@gmail.com" 399 | }, 400 | "maintainers": [ 401 | { 402 | "name": "mbostock", 403 | "email": "mike@ocks.org" 404 | } 405 | ], 406 | "dist": { 407 | "shasum": "6f68342c0f585eb8cb67bcd60b21dca846985614", 408 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.1.1.tgz" 409 | }, 410 | "directories": {} 411 | }, 412 | "0.2.0": { 413 | "name": "d3-random", 414 | "version": "0.2.0", 415 | "description": "Generate random numbers from various distributions.", 416 | "keywords": [ 417 | "d3", 418 | "random", 419 | "rng" 420 | ], 421 | "homepage": "https://github.com/d3/d3-random", 422 | "license": "BSD-3-Clause", 423 | "author": { 424 | "name": "Mike Bostock", 425 | "url": "http://bost.ocks.org/mike" 426 | }, 427 | "main": "build/d3-random.js", 428 | "jsnext:main": "index", 429 | "repository": { 430 | "type": "git", 431 | "url": "git+https://github.com/d3/d3-random.git" 432 | }, 433 | "scripts": { 434 | "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 -u d3-random -n d3_random -o build/d3-random.js -- build/bundle.js", 435 | "test": "faucet `find test -name '*-test.js'`", 436 | "prepublish": "npm run test && uglifyjs build/d3-random.js -c -m -o build/d3-random.min.js && rm -f build/d3-random.zip && zip -j build/d3-random.zip -- LICENSE README.md build/d3-random.js build/d3-random.min.js" 437 | }, 438 | "devDependencies": { 439 | "d3-array": "~0.7.0", 440 | "faucet": "0.0", 441 | "rollup": "0.20.5", 442 | "seedrandom": "2", 443 | "tape": "4", 444 | "uglify-js": "2" 445 | }, 446 | "gitHead": "e63b930b4f5da426f62a7eee5e00da4491a79859", 447 | "bugs": { 448 | "url": "https://github.com/d3/d3-random/issues" 449 | }, 450 | "_id": "d3-random@0.2.0", 451 | "_shasum": "daf13ab9ec60c028271a0f3cc42bedfa1a617b54", 452 | "_from": ".", 453 | "_npmVersion": "3.3.12", 454 | "_nodeVersion": "5.1.0", 455 | "_npmUser": { 456 | "name": "mbostock", 457 | "email": "mbostock@gmail.com" 458 | }, 459 | "maintainers": [ 460 | { 461 | "name": "mbostock", 462 | "email": "mike@ocks.org" 463 | } 464 | ], 465 | "dist": { 466 | "shasum": "daf13ab9ec60c028271a0f3cc42bedfa1a617b54", 467 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.2.0.tgz" 468 | }, 469 | "directories": {} 470 | }, 471 | "0.2.1": { 472 | "name": "d3-random", 473 | "version": "0.2.1", 474 | "description": "Generate random numbers from various distributions.", 475 | "keywords": [ 476 | "d3", 477 | "random", 478 | "rng" 479 | ], 480 | "homepage": "https://github.com/d3/d3-random", 481 | "license": "BSD-3-Clause", 482 | "author": { 483 | "name": "Mike Bostock", 484 | "url": "http://bost.ocks.org/mike" 485 | }, 486 | "main": "build/d3-random.js", 487 | "jsnext:main": "index", 488 | "repository": { 489 | "type": "git", 490 | "url": "git+https://github.com/d3/d3-random.git" 491 | }, 492 | "scripts": { 493 | "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 -n d3_random -o build/d3-random.js -- build/bundle.js", 494 | "test": "faucet `find test -name '*-test.js'` && eslint index.js src", 495 | "prepublish": "npm run test && uglifyjs build/d3-random.js -c -m -o build/d3-random.min.js && rm -f build/d3-random.zip && zip -j build/d3-random.zip -- LICENSE README.md build/d3-random.js build/d3-random.min.js", 496 | "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-random.js ../d3.github.com/d3-random.v0.2.js && cp build/d3-random.min.js ../d3.github.com/d3-random.v0.2.min.js && cd ../d3.github.com && git add d3-random.v0.2.js d3-random.v0.2.min.js && git commit -m \"d3-random ${VERSION}\" && git push" 497 | }, 498 | "devDependencies": { 499 | "d3-array": "~0.7.1", 500 | "faucet": "0.0", 501 | "rollup": "0.25", 502 | "seedrandom": "2", 503 | "tape": "4", 504 | "uglify-js": "2" 505 | }, 506 | "gitHead": "00adfea48630c8419f7d3987672245da15f77362", 507 | "bugs": { 508 | "url": "https://github.com/d3/d3-random/issues" 509 | }, 510 | "_id": "d3-random@0.2.1", 511 | "_shasum": "6141837199e6e7dbf13125e01e44b2c83e5e483f", 512 | "_from": ".", 513 | "_npmVersion": "3.3.12", 514 | "_nodeVersion": "5.4.0", 515 | "_npmUser": { 516 | "name": "mbostock", 517 | "email": "mbostock@gmail.com" 518 | }, 519 | "maintainers": [ 520 | { 521 | "name": "mbostock", 522 | "email": "mike@ocks.org" 523 | } 524 | ], 525 | "dist": { 526 | "shasum": "6141837199e6e7dbf13125e01e44b2c83e5e483f", 527 | "tarball": "https://registry.npmjs.org/d3-random/-/d3-random-0.2.1.tgz" 528 | }, 529 | "directories": {} 530 | } 531 | }, 532 | "readme": "# d3-random\n\nGenerate random numbers from various distributions.\n\n## Installing\n\nIf you use NPM, `npm install d3-random`. Otherwise, download the [latest release](https://github.com/d3/d3-random/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):\n\n```html\n\n```\n\nIn a vanilla environment, a `d3_random` global is exported. [Try d3-random in your browser.](https://tonicdev.com/npm/d3-random)\n\n## API Reference\n\n# d3.randomUniform([min, ][max])\n\nReturns a function for generating random numbers with a [uniform distribution](https://en.wikipedia.org/wiki/Uniform_distribution_\\(continuous\\)). The minimum allowed value of a returned number is *min*, and the maximum is *max*. If *min* is not specified, it defaults to 0; if *max* is not specified, it defaults to 1. For example:\n\n```js\nd3.randomUniform(6)(); // Returns a number greater than or equal to 0 and less than 6.\nd3.randomUniform(1, 5)(); // Returns a number greater than or equal to 1 and less than 5.\n```\n\nNote that you can also use the built-in [Math.random](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Math/random) to generate uniform distributions directly. For example, to generate a random integer between 0 and 99 (inclusive), you can say `Math.random() * 100 | 0`.\n\n# d3.randomNormal([mu][, sigma])\n\nReturns a function for generating random numbers with a [normal (Gaussian) distribution](https://en.wikipedia.org/wiki/Normal_distribution). The expected value of the generated numbers is *mu*, with the given standard deviation *sigma*. If *mu* is not specified, it defaults to 0; if *sigma* is not specified, it defaults to 1.\n\n# d3.randomLogNormal([mu][, sigma])\n\nReturns a function for generating random numbers with a [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_distribution). The expected value of the random variable’s natural logrithm is *mu*, with the given standard deviation *sigma*. If *mu* is not specified, it defaults to 0; if *sigma* is not specified, it defaults to 1.\n\n# d3.randomBates(n)\n\nReturns a function for generating random numbers with a [Bates distribution](https://en.wikipedia.org/wiki/Bates_distribution) with *n* independent variables.\n\n# d3.randomIrwinHall(n)\n\nReturns a function for generating random numbers with an [Irwin–Hall distribution](https://en.wikipedia.org/wiki/Irwin–Hall_distribution) with *n* independent variables.\n\n# d3.randomExponential(lambda)\n\nReturns a function for generating random numbers with an [exponential distribution](https://en.wikipedia.org/wiki/Exponential_distribution) with the rate *lambda*; equivalent to time between events in a [Poisson process](https://en.wikipedia.org/wiki/Poisson_point_process) with a mean of 1 / *lambda*. For example, exponential(1/40) generates random times between events where, on average, one event occurs every 40 units of time.\n", 533 | "maintainers": [ 534 | { 535 | "name": "mbostock", 536 | "email": "mike@ocks.org" 537 | } 538 | ], 539 | "time": { 540 | "modified": "2016-01-29T18:28:54.176Z", 541 | "created": "2014-04-03T15:52:16.205Z", 542 | "0.0.0": "2014-04-03T15:52:16.205Z", 543 | "0.0.1": "2015-06-09T17:49:06.070Z", 544 | "0.0.2": "2015-06-16T21:02:23.767Z", 545 | "0.0.3": "2015-11-04T07:40:03.934Z", 546 | "0.0.4": "2015-11-11T19:22:33.463Z", 547 | "0.1.0": "2015-11-16T18:21:50.311Z", 548 | "0.1.1": "2015-12-18T22:42:50.333Z", 549 | "0.2.0": "2016-01-07T20:52:43.775Z", 550 | "0.2.1": "2016-01-29T18:28:54.176Z" 551 | }, 552 | "homepage": "https://github.com/d3/d3-random", 553 | "keywords": [ 554 | "d3", 555 | "random", 556 | "rng" 557 | ], 558 | "repository": { 559 | "type": "git", 560 | "url": "git+https://github.com/d3/d3-random.git" 561 | }, 562 | "author": { 563 | "name": "Mike Bostock", 564 | "url": "http://bost.ocks.org/mike" 565 | }, 566 | "bugs": { 567 | "url": "https://github.com/d3/d3-random/issues" 568 | }, 569 | "license": "BSD-3-Clause", 570 | "readmeFilename": "README.md", 571 | "_attachments": {} 572 | } -------------------------------------------------------------------------------- /data/xmlhttprequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "_id": "xmlhttprequest", 3 | "_rev": "35-4389fb50e5953319bdabcfaa070d4d1d", 4 | "name": "xmlhttprequest", 5 | "description": "XMLHttpRequest for Node", 6 | "dist-tags": { 7 | "latest": "1.8.0" 8 | }, 9 | "versions": { 10 | "1.0.0": { 11 | "name": "xmlhttprequest", 12 | "description": "XMLHttpRequest for Node", 13 | "version": "1.0.0", 14 | "author": { 15 | "name": "Dan DeFelippi" 16 | }, 17 | "licenses": [ 18 | { 19 | "type": "MIT", 20 | "url": "http://creativecommons.org/licenses/MIT/" 21 | } 22 | ], 23 | "repository": { 24 | "type": "git", 25 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 26 | }, 27 | "engine": [ 28 | "node >=0.4.0" 29 | ], 30 | "main": "./XMLHttpRequest.js", 31 | "_id": "xmlhttprequest@1.0.0", 32 | "engines": { 33 | "node": "*" 34 | }, 35 | "_engineSupported": true, 36 | "_npmVersion": "0.3.12", 37 | "_nodeVersion": "v0.4.1", 38 | "directories": {}, 39 | "files": [ 40 | "" 41 | ], 42 | "_defaultsLoaded": true, 43 | "dist": { 44 | "shasum": "06274b14e87b3feec289c40ebd947e85289f86c1", 45 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.0.0.tgz" 46 | } 47 | }, 48 | "1.2.0": { 49 | "name": "xmlhttprequest", 50 | "description": "XMLHttpRequest for Node", 51 | "version": "1.2.0", 52 | "author": { 53 | "name": "Dan DeFelippi" 54 | }, 55 | "licenses": [ 56 | { 57 | "type": "MIT", 58 | "url": "http://creativecommons.org/licenses/MIT/" 59 | } 60 | ], 61 | "repository": { 62 | "type": "git", 63 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 64 | }, 65 | "engine": [ 66 | "node >=0.4.0" 67 | ], 68 | "main": "./XMLHttpRequest.js", 69 | "_id": "xmlhttprequest@1.2.0", 70 | "engines": { 71 | "node": "*" 72 | }, 73 | "_engineSupported": true, 74 | "_npmVersion": "0.3.18", 75 | "_nodeVersion": "v0.5.0-pre", 76 | "directories": {}, 77 | "files": [ 78 | "" 79 | ], 80 | "_defaultsLoaded": true, 81 | "dist": { 82 | "shasum": "1cd061188912ba87bdba6e67d99c86ebb5b77fd1", 83 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.2.0.tgz" 84 | } 85 | }, 86 | "1.2.1": { 87 | "name": "xmlhttprequest", 88 | "description": "XMLHttpRequest for Node", 89 | "version": "1.2.1", 90 | "author": { 91 | "name": "Dan DeFelippi" 92 | }, 93 | "licenses": [ 94 | { 95 | "type": "MIT", 96 | "url": "http://creativecommons.org/licenses/MIT/" 97 | } 98 | ], 99 | "repository": { 100 | "type": "git", 101 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 102 | }, 103 | "engine": [ 104 | "node >=0.4.0" 105 | ], 106 | "main": "./XMLHttpRequest.js", 107 | "_id": "xmlhttprequest@1.2.1", 108 | "engines": { 109 | "node": "*" 110 | }, 111 | "_engineSupported": true, 112 | "_npmVersion": "0.3.18", 113 | "_nodeVersion": "v0.5.0-pre", 114 | "directories": {}, 115 | "files": [ 116 | "" 117 | ], 118 | "_defaultsLoaded": true, 119 | "dist": { 120 | "shasum": "1696d4b69e97fec1f07b094dfd048fa31323a5b4", 121 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.2.1.tgz" 122 | } 123 | }, 124 | "1.2.2": { 125 | "name": "xmlhttprequest", 126 | "description": "XMLHttpRequest for Node", 127 | "version": "1.2.2", 128 | "author": { 129 | "name": "Dan DeFelippi" 130 | }, 131 | "licenses": [ 132 | { 133 | "type": "MIT", 134 | "url": "http://creativecommons.org/licenses/MIT/" 135 | } 136 | ], 137 | "repository": { 138 | "type": "git", 139 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 140 | }, 141 | "engine": [ 142 | "node >=0.4.0" 143 | ], 144 | "main": "./XMLHttpRequest.js", 145 | "_id": "xmlhttprequest@1.2.2", 146 | "engines": { 147 | "node": "*" 148 | }, 149 | "_engineSupported": true, 150 | "_npmVersion": "0.3.18", 151 | "_nodeVersion": "v0.5.0-pre", 152 | "directories": {}, 153 | "files": [ 154 | "" 155 | ], 156 | "_defaultsLoaded": true, 157 | "dist": { 158 | "shasum": "e8875bdb13af7c22b04cbb034caadf8ff22676a3", 159 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.2.2.tgz" 160 | } 161 | }, 162 | "1.3.0": { 163 | "name": "xmlhttprequest", 164 | "description": "XMLHttpRequest for Node", 165 | "version": "1.3.0", 166 | "author": { 167 | "name": "Dan DeFelippi" 168 | }, 169 | "licenses": [ 170 | { 171 | "type": "MIT", 172 | "url": "http://creativecommons.org/licenses/MIT/" 173 | } 174 | ], 175 | "repository": { 176 | "type": "git", 177 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 178 | }, 179 | "engine": [ 180 | "node >=0.4.0" 181 | ], 182 | "main": "./XMLHttpRequest.js", 183 | "_npmUser": { 184 | "name": "driverdan", 185 | "email": "dan@driverdan.com" 186 | }, 187 | "_id": "xmlhttprequest@1.3.0", 188 | "dependencies": {}, 189 | "devDependencies": {}, 190 | "engines": { 191 | "node": "*" 192 | }, 193 | "_engineSupported": true, 194 | "_npmVersion": "1.0.103", 195 | "_nodeVersion": "v0.4.12", 196 | "_defaultsLoaded": true, 197 | "dist": { 198 | "shasum": "f6888d76176a9e4217694aa168a02c366e5d454a", 199 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.3.0.tgz" 200 | }, 201 | "maintainers": [ 202 | { 203 | "name": "driverdan", 204 | "email": "dan@driverdan.com" 205 | } 206 | ], 207 | "directories": {} 208 | }, 209 | "1.4.0": { 210 | "name": "xmlhttprequest", 211 | "description": "XMLHttpRequest for Node", 212 | "version": "1.4.0", 213 | "author": { 214 | "name": "Dan DeFelippi", 215 | "url": "http://driverdan.com" 216 | }, 217 | "keywords": [ 218 | "xhr", 219 | "ajax" 220 | ], 221 | "licenses": [ 222 | { 223 | "type": "MIT", 224 | "url": "http://creativecommons.org/licenses/MIT/" 225 | } 226 | ], 227 | "repository": { 228 | "type": "git", 229 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 230 | }, 231 | "bugs": { 232 | "name": "http://github.com/driverdan/node-XMLHttpRequest/issues" 233 | }, 234 | "engines": { 235 | "node": ">=0.4.0" 236 | }, 237 | "directories": { 238 | "lib": "./lib", 239 | "example": "./example" 240 | }, 241 | "main": "./lib/XMLHttpRequest.js", 242 | "_npmUser": { 243 | "name": "driverdan", 244 | "email": "dan@driverdan.com" 245 | }, 246 | "_id": "xmlhttprequest@1.4.0", 247 | "dependencies": {}, 248 | "devDependencies": {}, 249 | "optionalDependencies": {}, 250 | "_engineSupported": true, 251 | "_npmVersion": "1.1.1", 252 | "_nodeVersion": "v0.6.11", 253 | "_defaultsLoaded": true, 254 | "dist": { 255 | "shasum": "a9ab021052cdedadf5c0c50de3cf769c87165312", 256 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.0.tgz" 257 | }, 258 | "maintainers": [ 259 | { 260 | "name": "driverdan", 261 | "email": "dan@driverdan.com" 262 | } 263 | ] 264 | }, 265 | "1.4.2": { 266 | "name": "xmlhttprequest", 267 | "description": "XMLHttpRequest for Node", 268 | "version": "1.4.2", 269 | "author": { 270 | "name": "Dan DeFelippi", 271 | "url": "http://driverdan.com" 272 | }, 273 | "keywords": [ 274 | "xhr", 275 | "ajax" 276 | ], 277 | "licenses": [ 278 | { 279 | "type": "MIT", 280 | "url": "http://creativecommons.org/licenses/MIT/" 281 | } 282 | ], 283 | "repository": { 284 | "type": "git", 285 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 286 | }, 287 | "bugs": { 288 | "name": "http://github.com/driverdan/node-XMLHttpRequest/issues" 289 | }, 290 | "engines": { 291 | "node": ">=0.4.0" 292 | }, 293 | "directories": { 294 | "lib": "./lib", 295 | "example": "./example" 296 | }, 297 | "main": "./lib/XMLHttpRequest.js", 298 | "_npmUser": { 299 | "name": "driverdan", 300 | "email": "dan@driverdan.com" 301 | }, 302 | "_id": "xmlhttprequest@1.4.2", 303 | "dependencies": {}, 304 | "devDependencies": {}, 305 | "optionalDependencies": {}, 306 | "_engineSupported": true, 307 | "_npmVersion": "1.1.24", 308 | "_nodeVersion": "v0.6.19", 309 | "_defaultsLoaded": true, 310 | "dist": { 311 | "shasum": "01453a1d9bed1e8f172f6495bbf4c8c426321500", 312 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz" 313 | }, 314 | "maintainers": [ 315 | { 316 | "name": "driverdan", 317 | "email": "dan@driverdan.com" 318 | } 319 | ] 320 | }, 321 | "1.5.0": { 322 | "name": "xmlhttprequest", 323 | "description": "XMLHttpRequest for Node", 324 | "version": "1.5.0", 325 | "author": { 326 | "name": "Dan DeFelippi", 327 | "url": "http://driverdan.com" 328 | }, 329 | "keywords": [ 330 | "xhr", 331 | "ajax" 332 | ], 333 | "licenses": [ 334 | { 335 | "type": "MIT", 336 | "url": "http://creativecommons.org/licenses/MIT/" 337 | } 338 | ], 339 | "repository": { 340 | "type": "git", 341 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 342 | }, 343 | "bugs": "http://github.com/driverdan/node-XMLHttpRequest/issues", 344 | "engines": { 345 | "node": ">=0.4.0" 346 | }, 347 | "directories": { 348 | "lib": "./lib", 349 | "example": "./example" 350 | }, 351 | "main": "./lib/XMLHttpRequest.js", 352 | "_id": "xmlhttprequest@1.5.0", 353 | "dist": { 354 | "shasum": "bbf102b430bca9f6b8451a36e11bfb6355a25560", 355 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.5.0.tgz" 356 | }, 357 | "_npmVersion": "1.1.62", 358 | "_npmUser": { 359 | "name": "driverdan", 360 | "email": "dan@driverdan.com" 361 | }, 362 | "maintainers": [ 363 | { 364 | "name": "driverdan", 365 | "email": "dan@driverdan.com" 366 | } 367 | ] 368 | }, 369 | "1.6.0": { 370 | "name": "xmlhttprequest", 371 | "description": "XMLHttpRequest for Node", 372 | "version": "1.6.0", 373 | "author": { 374 | "name": "Dan DeFelippi", 375 | "url": "http://driverdan.com" 376 | }, 377 | "keywords": [ 378 | "xhr", 379 | "ajax" 380 | ], 381 | "licenses": [ 382 | { 383 | "type": "MIT", 384 | "url": "http://creativecommons.org/licenses/MIT/" 385 | } 386 | ], 387 | "repository": { 388 | "type": "git", 389 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 390 | }, 391 | "bugs": { 392 | "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" 393 | }, 394 | "engines": { 395 | "node": ">=0.4.0" 396 | }, 397 | "directories": { 398 | "lib": "./lib", 399 | "example": "./example" 400 | }, 401 | "main": "./lib/XMLHttpRequest.js", 402 | "_id": "xmlhttprequest@1.6.0", 403 | "dist": { 404 | "shasum": "493d285f59266fdcb8d4fefd25345a7b693c966c", 405 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.6.0.tgz" 406 | }, 407 | "_from": ".", 408 | "_npmVersion": "1.2.32", 409 | "_npmUser": { 410 | "name": "driverdan", 411 | "email": "dan@driverdan.com" 412 | }, 413 | "maintainers": [ 414 | { 415 | "name": "driverdan", 416 | "email": "dan@driverdan.com" 417 | } 418 | ] 419 | }, 420 | "1.7.0": { 421 | "name": "xmlhttprequest", 422 | "description": "XMLHttpRequest for Node", 423 | "version": "1.7.0", 424 | "author": { 425 | "name": "Dan DeFelippi", 426 | "url": "http://driverdan.com" 427 | }, 428 | "keywords": [ 429 | "xhr", 430 | "ajax" 431 | ], 432 | "licenses": [ 433 | { 434 | "type": "MIT", 435 | "url": "http://creativecommons.org/licenses/MIT/" 436 | } 437 | ], 438 | "repository": { 439 | "type": "git", 440 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 441 | }, 442 | "bugs": { 443 | "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" 444 | }, 445 | "engines": { 446 | "node": ">=0.4.0" 447 | }, 448 | "directories": { 449 | "lib": "./lib", 450 | "example": "./example" 451 | }, 452 | "main": "./lib/XMLHttpRequest.js", 453 | "homepage": "https://github.com/driverdan/node-XMLHttpRequest", 454 | "_id": "xmlhttprequest@1.7.0", 455 | "dist": { 456 | "shasum": "dc697a8df0258afacad526c1c296b1bdd12c4ab3", 457 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.7.0.tgz" 458 | }, 459 | "_from": ".", 460 | "_npmVersion": "1.4.3", 461 | "_npmUser": { 462 | "name": "driverdan", 463 | "email": "dan@driverdan.com" 464 | }, 465 | "maintainers": [ 466 | { 467 | "name": "driverdan", 468 | "email": "dan@driverdan.com" 469 | } 470 | ] 471 | }, 472 | "1.8.0": { 473 | "name": "xmlhttprequest", 474 | "description": "XMLHttpRequest for Node", 475 | "version": "1.8.0", 476 | "author": { 477 | "name": "Dan DeFelippi", 478 | "url": "http://driverdan.com" 479 | }, 480 | "keywords": [ 481 | "xhr", 482 | "ajax" 483 | ], 484 | "license": "MIT", 485 | "repository": { 486 | "type": "git", 487 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 488 | }, 489 | "bugs": { 490 | "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" 491 | }, 492 | "engines": { 493 | "node": ">=0.4.0" 494 | }, 495 | "directories": { 496 | "lib": "./lib", 497 | "example": "./example" 498 | }, 499 | "main": "./lib/XMLHttpRequest.js", 500 | "gitHead": "86ff70effb6dd529b34650242b9e3b1f0b8b6e86", 501 | "homepage": "https://github.com/driverdan/node-XMLHttpRequest", 502 | "_id": "xmlhttprequest@1.8.0", 503 | "scripts": {}, 504 | "_shasum": "67fe075c5c24fef39f9d65f5f7b7fe75171968fc", 505 | "_from": ".", 506 | "_npmVersion": "2.7.5", 507 | "_nodeVersion": "0.12.2", 508 | "_npmUser": { 509 | "name": "driverdan", 510 | "email": "dan@driverdan.com" 511 | }, 512 | "dist": { 513 | "shasum": "67fe075c5c24fef39f9d65f5f7b7fe75171968fc", 514 | "tarball": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" 515 | }, 516 | "maintainers": [ 517 | { 518 | "name": "driverdan", 519 | "email": "dan@driverdan.com" 520 | } 521 | ] 522 | } 523 | }, 524 | "maintainers": [ 525 | { 526 | "name": "driverdan", 527 | "email": "dan@driverdan.com" 528 | } 529 | ], 530 | "time": { 531 | "modified": "2015-10-11T20:15:32.925Z", 532 | "created": "2011-03-04T01:10:24.994Z", 533 | "1.0.0": "2011-03-04T01:10:25.174Z", 534 | "1.2.0": "2011-07-22T22:08:38.274Z", 535 | "1.2.1": "2011-07-22T22:10:39.383Z", 536 | "1.2.2": "2011-07-22T22:18:19.147Z", 537 | "1.3.0": "2011-11-01T05:57:17.320Z", 538 | "1.4.0": "2012-06-01T20:37:25.666Z", 539 | "1.4.2": "2012-06-09T16:10:36.029Z", 540 | "1.5.0": "2012-09-27T04:33:05.270Z", 541 | "1.6.0": "2013-07-04T03:03:00.701Z", 542 | "1.7.0": "2015-01-09T03:38:00.130Z", 543 | "1.8.0": "2015-10-11T20:15:32.925Z" 544 | }, 545 | "author": { 546 | "name": "Dan DeFelippi", 547 | "url": "http://driverdan.com" 548 | }, 549 | "repository": { 550 | "type": "git", 551 | "url": "git://github.com/driverdan/node-XMLHttpRequest.git" 552 | }, 553 | "users": { 554 | "fgribreau": true, 555 | "matthew_pflueger": true, 556 | "hagb4rd": true, 557 | "kareemfikry": true, 558 | "damianof": true, 559 | "nketchum": true, 560 | "luckyulin": true, 561 | "evanyeung": true, 562 | "piecioshka": true 563 | }, 564 | "readme": "# node-XMLHttpRequest #\n\nnode-XMLHttpRequest is a wrapper for the built-in http client to emulate the\nbrowser XMLHttpRequest object.\n\nThis can be used with JS designed for browsers to improve reuse of code and\nallow the use of existing libraries.\n\nNote: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/).\n\n## Usage ##\n\nHere's how to include the module in your project and use as the browser-based\nXHR object.\n\n\tvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\n\tvar xhr = new XMLHttpRequest();\n\nNote: use the lowercase string \"xmlhttprequest\" in your require(). On\ncase-sensitive systems (eg Linux) using uppercase letters won't work.\n\n## Versions ##\n\nPrior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to\nthe standard major.minor.bugfix. 1.x shouldn't necessarily be considered\nstable just because it's above 0.x.\n\nSince the XMLHttpRequest API is stable this library's API is stable as\nwell. Major version numbers indicate significant core code changes.\nMinor versions indicate minor core code changes or better conformity to\nthe W3C spec.\n\n## License ##\n\nMIT license. See LICENSE for full details.\n\n## Supports ##\n\n* Async and synchronous requests\n* GET, POST, PUT, and DELETE requests\n* All spec methods (open, send, abort, getRequestHeader,\n getAllRequestHeaders, event methods)\n* Requests to all domains\n\n## Known Issues / Missing Features ##\n\nFor a list of open issues or to report your own visit the [github issues\npage](https://github.com/driverdan/node-XMLHttpRequest/issues).\n\n* Local file access may have unexpected results for non-UTF8 files\n* Synchronous requests don't set headers properly\n* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).\n* Some events are missing, such as abort\n* Cookies aren't persisted between requests\n* Missing XML support\n", 565 | "homepage": "https://github.com/driverdan/node-XMLHttpRequest", 566 | "keywords": [ 567 | "xhr", 568 | "ajax" 569 | ], 570 | "bugs": { 571 | "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" 572 | }, 573 | "readmeFilename": "README.md", 574 | "license": "MIT", 575 | "_attachments": {} 576 | } -------------------------------------------------------------------------------- /doc/images/d3_modules_clients_shown_or_hidden.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/doc/images/d3_modules_clients_shown_or_hidden.gif -------------------------------------------------------------------------------- /doc/images/d3_modules_d3_axis_sets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/doc/images/d3_modules_d3_axis_sets.png -------------------------------------------------------------------------------- /doc/images/d3_modules_dependencies_set_or_links.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/doc/images/d3_modules_dependencies_set_or_links.gif -------------------------------------------------------------------------------- /doc/images/d3_modules_use_first_or_last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/doc/images/d3_modules_use_first_or_last.gif -------------------------------------------------------------------------------- /doc/images/usage_quick.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mindrones/timely-dependency-graph/4d83f04d4b1bde9cd37d29fbd18422443ce96de2/doc/images/usage_quick.gif -------------------------------------------------------------------------------- /gulp/index.js: -------------------------------------------------------------------------------- 1 | import './tasks/assets' 2 | import './tasks/build' 3 | import './tasks/data' 4 | import './tasks/default' 5 | import './tasks/html' 6 | import './tasks/images' 7 | import './tasks/logic' 8 | import './tasks/serve' 9 | import './tasks/style' 10 | -------------------------------------------------------------------------------- /gulp/opts.js: -------------------------------------------------------------------------------- 1 | import { default as minimist } from 'minimist' 2 | export default minimist(process.argv.slice(2), { 3 | boolean: [ 4 | 'p', // production build? 5 | ], 6 | default: { 7 | p: false, 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /gulp/tasks/assets.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as gutil } from 'gulp-util' 3 | 4 | gulp.task('assets', () => { 5 | return gulp.src('./assets/**/*', {base: './assets/'}) 6 | .pipe(gulp.dest('./build/dev/assets/')) 7 | .pipe(gulp.dest('./build/dist/assets/')) 8 | .on('error', gutil.log) 9 | }); 10 | -------------------------------------------------------------------------------- /gulp/tasks/build.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | 3 | gulp.task('build', ['images', 'assets', 'data', 'html', 'logic', 'style']); 4 | -------------------------------------------------------------------------------- /gulp/tasks/data.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as gutil } from 'gulp-util' 3 | 4 | gulp.task('data', () => { 5 | return gulp.src('./data/**/*', {base: './'}) 6 | .pipe(gulp.dest('./build/dev')) 7 | .pipe(gulp.dest('./build/dist')) 8 | .on('error', gutil.log) 9 | }); 10 | -------------------------------------------------------------------------------- /gulp/tasks/default.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as runSequence } from 'run-sequence' 3 | 4 | gulp.task('default', () => { runSequence('build', 'serve') }) 5 | -------------------------------------------------------------------------------- /gulp/tasks/html.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as gutil } from 'gulp-util' 3 | import { default as preprocess } from 'gulp-preprocess' 4 | import { default as opts } from '../opts'; 5 | 6 | gulp.task('html', () => { 7 | return gulp.src('./src/viz/index.html') 8 | .pipe( preprocess({ context: {PRODUCTION: opts.p} }) ) 9 | .pipe(gulp.dest('./build/dev')) 10 | .pipe(gulp.dest('./build/dist')) 11 | .on('error', gutil.log); 12 | }); 13 | -------------------------------------------------------------------------------- /gulp/tasks/images.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as gutil } from 'gulp-util' 3 | 4 | gulp.task('images', () => { 5 | return gulp.src([ 6 | './doc/images/usage_quick.gif', 7 | './doc/images/d3_modules_d3_axis_sets.png' 8 | ], {base: './doc/images/'}) 9 | .pipe(gulp.dest('./build/dist')) 10 | .on('error', gutil.log) 11 | }); 12 | -------------------------------------------------------------------------------- /gulp/tasks/logic.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as gutil } from 'gulp-util' 3 | import { default as browserify } from 'browserify' 4 | import { default as source } from 'vinyl-source-stream' 5 | import { default as buffer } from 'vinyl-buffer' 6 | import { default as uglify } from 'gulp-uglify' 7 | import { default as gulpif } from 'gulp-if' 8 | import { default as preprocess } from 'gulp-preprocess' 9 | import { default as opts } from '../opts'; 10 | 11 | gulp.task('logic', () => { 12 | return browserify('./src/viz/logic/index.js') 13 | .bundle() 14 | .pipe(source('index.js')) 15 | .pipe(buffer()) 16 | .pipe( preprocess({ context: {PRODUCTION: opts.p} }) ) 17 | .pipe(gulp.dest('./build/dev')) 18 | .pipe(gulpif(opts.p, uglify({preserveComments: 'license'}))) 19 | .pipe(gulp.dest('./build/dist')) 20 | .on('error', gutil.log) 21 | }); 22 | -------------------------------------------------------------------------------- /gulp/tasks/serve.js: -------------------------------------------------------------------------------- 1 | import { default as gulp } from 'gulp' 2 | import { default as browserSync } from 'browser-sync' 3 | 4 | gulp.task('serve', () => { 5 | browserSync.init({ 6 | server: { 7 | baseDir: './build/dev', 8 | }, 9 | port: 8001, 10 | open: false, 11 | reloadOnRestart: true, 12 | notify: false, 13 | ghostMode: false 14 | }); 15 | 16 | gulp.watch([ 17 | './src/viz/style/**/*.less', 18 | ], ['style']); 19 | gulp.watch([ 20 | './src/viz/logic/**/*.js', 21 | ], ['logic', browserSync.reload]); 22 | gulp.watch('./src/viz/index.html', ['html', browserSync.reload]); 23 | gulp.watch('./data/**/*.json', ['data', browserSync.reload]); 24 | 25 | // images 26 | gulp.watch('./doc/images/**/*', ['images', browserSync.reload]); 27 | gulp.watch('./assets/**/*', ['assets', browserSync.reload]); 28 | }); 29 | -------------------------------------------------------------------------------- /gulp/tasks/style.js: -------------------------------------------------------------------------------- 1 | import { default as path } from 'path' 2 | import { default as gulp } from 'gulp' 3 | import { default as gutil } from 'gulp-util' 4 | import { default as less } from 'gulp-less' 5 | import { default as cssnano } from 'gulp-cssnano' 6 | import { default as browserSync } from 'browser-sync' 7 | 8 | var cssnanoOptions = { 9 | 10 | /* custom */ 11 | 12 | safe: true, 13 | calc: false, 14 | normalizeUrl: {normalizeProtocol: false}, 15 | autoprefixer: {browsers: 'last 3 versions'}, 16 | 17 | /* defaults, explicit to understand what's going on */ 18 | 19 | discardComments: true, 20 | discardEmpty: true, 21 | discardDuplicates: true, 22 | normalizeCharset: true, 23 | minifySelectors: true, 24 | uniqueSelectors: true, 25 | mergeLonghand: true, 26 | minifyFontValues: true, 27 | 28 | // careful, converts px to picas, check this in case of problems 29 | convertValues: true, 30 | reduceTransforms: true, 31 | colormin: true, 32 | mergeRules: true, 33 | minifyGradients: true, 34 | 35 | 36 | /* unsafe */ 37 | 38 | // custom 39 | zindex: false, 40 | mergeIdents: false, 41 | 42 | // defaults 43 | discardUnused: true, 44 | reduceIdents: true, 45 | }; 46 | 47 | gulp.task('style', () => { 48 | return gulp.src('./src/viz/style/index.less') 49 | .pipe(less({paths: ['./src/viz/style']}).on('error', gutil.log)) 50 | .pipe(gulp.dest('./build/dev')) 51 | .pipe(cssnano(cssnanoOptions)) 52 | .pipe(gulp.dest('./build/dist')) 53 | .pipe(browserSync.stream()) 54 | ; 55 | }); 56 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | require('babel-core/register', { ignore: false }) 2 | require('./gulp') 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "timely-dependency-graph", 3 | "version": "1.0.0", 4 | "description": "Interactive Dependency Time Graph for NPM Modules", 5 | "keywords": [ 6 | "npm", 7 | "module", 8 | "release", 9 | "version", 10 | "dependency", 11 | "graph", 12 | "time", 13 | "data visualization", 14 | "d3" 15 | ], 16 | "homepage": "https://mindrones.github.io/timely-dependency-graph", 17 | "repository": { 18 | "url": "https://github.com/mindrones/timely-dependency-graph", 19 | "type": "git" 20 | }, 21 | "bugs": "https://github.com/mindrones/timely-dependency-graph/issues", 22 | "license": "GPL-3.0", 23 | "author": { 24 | "name": "Luca Bonavita", 25 | "url": "http://mindrones.com/" 26 | }, 27 | "devDependencies": { 28 | "babel-core": "^6.9.0", 29 | "babel-preset-es2015": "^6.9.0", 30 | "babel-register": "^6.9.0", 31 | "browser-sync": "^2.11.1", 32 | "browserify": "^13.0.0", 33 | "gulp": "^3.9.1", 34 | "gulp-cssnano": "^2.1.1", 35 | "gulp-if": "^2.0.0", 36 | "gulp-less": "^3.0.5", 37 | "gulp-preprocess": "^2.0.0", 38 | "gulp-uglify": "^1.5.3", 39 | "gulp-util": "^3.0.7", 40 | "minimist": "^1.2.0", 41 | "run-sequence": "^1.1.5", 42 | "vinyl-buffer": "^1.0.0", 43 | "vinyl-source-stream": "^1.1.0" 44 | }, 45 | "dependencies": { 46 | "d3": "^3.5.16", 47 | "semver": "^5.1.0", 48 | "underscore": "^1.8.3" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/scripts/grab_modules.js: -------------------------------------------------------------------------------- 1 | // `node grab.js` to download in data/ 2 | 3 | var fs = require('fs'); 4 | var path = require('path'); 5 | 6 | var d3 = require('d3'); 7 | var _ = require('underscore'); 8 | var request = require('request'); 9 | 10 | var NPM_API_BASE = 'http://registry.npmjs.cf/' 11 | var MAIN_MODULE = 'd3' 12 | var dataDir = path.resolve(path.join(__dirname, '../../data')) 13 | 14 | var progress = {}; 15 | var data = {}; 16 | 17 | var dispatch = 18 | d3.dispatch( 19 | 'register_module', 20 | 'mark_module', 21 | 'check_modules', 22 | 23 | 'fetch_module', 24 | 'module_fetched' 25 | ) 26 | .on('register_module', registerModule) 27 | .on('mark_module', markModule) 28 | .on('check_modules', checkModules) 29 | .on('fetch_module', fetchModule) 30 | .on('module_fetched.store', storeModule) 31 | .on('module_fetched.process', processModule) 32 | 33 | dispatch.fetch_module(MAIN_MODULE); 34 | 35 | function registerModule(name) { 36 | progress[name] = true; 37 | } 38 | 39 | function markModule(name) { 40 | progress[name] = false; 41 | dispatch.check_modules(); 42 | } 43 | 44 | function checkModules() { 45 | var allDone = _.chain(progress).values().filter().isEmpty().value() === true; 46 | if (allDone) { 47 | console.log('Done.'); 48 | } 49 | } 50 | 51 | function fetchModule(name) { 52 | dispatch.register_module(name); 53 | request(NPM_API_BASE + name, function (error, response, body) { 54 | if (!error && response.statusCode === 200) { 55 | dispatch.module_fetched(name, JSON.parse(body)); 56 | } 57 | }) 58 | } 59 | 60 | function processModule(name, module) { 61 | 62 | /* fetch missing deps */ 63 | _.chain(module.versions) 64 | .pick(function(release, version) { 65 | return name === 'd3' ? version[0] >= '4' : true 66 | }) 67 | .map(function(release, version) { 68 | return _.keys(release.dependencies) 69 | }) 70 | .flatten() 71 | .uniq() 72 | .each(function(depName) { 73 | if (!_.has(progress, depName)) { 74 | dispatch.fetch_module(depName); 75 | } 76 | }) 77 | 78 | /* mark module as done */ 79 | dispatch.mark_module(name); 80 | } 81 | 82 | function storeModule(name, module) { 83 | var filepath = path.resolve(path.join(dataDir, name + '.json')) 84 | var moduleString = JSON.stringify(module, null, 2) 85 | fs.writeFile(filepath, moduleString, function(err) { 86 | if (err) {throw err} 87 | console.log('stored', filepath); 88 | }) 89 | } 90 | -------------------------------------------------------------------------------- /src/viz/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | D3 modules dependencies time graphs 19 | 20 | 21 | 22 |
23 |
24 |

D3 modules dependencies time graphs

25 |
26 | 190 |
191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /src/viz/logic/utils/dom.js: -------------------------------------------------------------------------------- 1 | var _ = require('underscore'); 2 | 3 | function getElementGeometry(elem) { 4 | var cs = getComputedStyle(elem); 5 | var size = _.chain(cs) 6 | .pick('width', 'height') 7 | .mapObject(function(pxValue) { return parseFloat(pxValue, 10); }) 8 | .value() 9 | ; 10 | return size; 11 | } 12 | 13 | function getTextFontSize(textElem) { 14 | var fontSizePx = getComputedStyle(textElem).fontSize; 15 | return parseFloat(fontSizePx, 10); 16 | } 17 | 18 | module.exports = { 19 | getElementGeometry: getElementGeometry, 20 | getTextFontSize: getTextFontSize 21 | }; 22 | -------------------------------------------------------------------------------- /src/viz/logic/utils/semver.js: -------------------------------------------------------------------------------- 1 | var semver = require('semver') 2 | 3 | function parseVersion(input) { 4 | var obj 5 | 6 | if (semver.valid(input)) { 7 | // '1.2.3' -> {isRelease: true, version: '1.2.3'} 8 | obj = {isRelease: true, version: input} 9 | } else { 10 | var range = semver.validRange(input) 11 | if (range) { 12 | range = range.split(' ') 13 | if (range.length === 1) { 14 | // '>= 1.0.0' := '>= 1.0.0' -> {isRelease: true, version: '1.0.0'} 15 | obj = {isRelease: true, version: range[0].slice(2)} 16 | } else if (range.length === 2) { 17 | // '~1.2.3' := '>=1.2.3 <1.3.0' -> {isRange: true, start: '1.2.3', stop: '1.3.0'} 18 | obj = {isRange: true, first: range[0].slice(2), stop: range[1].slice(1)} 19 | } 20 | } else { 21 | throw 'parseVersion input: ' + JSON.stringify(input) 22 | } 23 | } 24 | return obj 25 | } 26 | 27 | module.exports = { 28 | parseVersion: parseVersion, 29 | }; 30 | -------------------------------------------------------------------------------- /src/viz/style/_mixins.less: -------------------------------------------------------------------------------- 1 | @import "media"; 2 | 3 | .resolutionBasedGlobalFont() { 4 | @media @mediumDensityScreen { 5 | font-size: e("@{mdppx}vmin"); 6 | } 7 | @media @highDensityScreen { 8 | font-size: e("@{hdppx}vmin"); 9 | } 10 | @media @xhighDensityScreen { 11 | font-size: e("@{xhdppx}vmin"); 12 | } 13 | @media @xxhighDensityScreen { 14 | font-size: e("@{xxhdppx}vmin"); 15 | } 16 | } 17 | 18 | .resolutionBasedFont() { 19 | @media @mediumDensityScreen { 20 | font-size: 1.4em; 21 | } 22 | @media @highDensityScreen { 23 | font-size: 0.9em; 24 | } 25 | @media @xhighDensityScreen { 26 | font-size: 0.8em; 27 | } 28 | @media @xxhighDensityScreen { 29 | font-size: 0.7em; 30 | } 31 | } 32 | 33 | .dev_resolutionBasedBkgColor() { 34 | @media @mediumDensityScreen { 35 | background-color: lighten(red, 40%); 36 | } 37 | @media @highDensityScreen { 38 | background-color: lighten(yellow, 10%); 39 | } 40 | @media @xhighDensityScreen { 41 | background-color: lighten(palegreen, 10%); 42 | } 43 | @media @xxhighDensityScreen { 44 | background-color: lighten(cyan, 40%); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/viz/style/_vars.less: -------------------------------------------------------------------------------- 1 | @clientLineStrokeDasharray: 2 2; 2 | -------------------------------------------------------------------------------- /src/viz/style/chart.less: -------------------------------------------------------------------------------- 1 | @import "_vars"; 2 | @import "_mixins"; 3 | 4 | @chartH1FontSize: 1.5em; 5 | 6 | #chart { 7 | flex: 1 1 0; 8 | 9 | display: flex; 10 | flex-direction: column; 11 | 12 | h1 { 13 | flex: 0 0 @chartH1FontSize; 14 | padding: 0.6em 0.8em 1em; 15 | font-size: @chartH1FontSize; 16 | } 17 | 18 | svg { 19 | flex: 1 1 0; 20 | width: 100%; 21 | 22 | text { 23 | fill: black; 24 | stroke: none; 25 | // .resolutionBasedFont; 26 | font-size: 1.4vmin; 27 | } 28 | 29 | .axis { 30 | path.domain { 31 | fill: none; 32 | stroke: none; 33 | } 34 | 35 | .tick { 36 | line { 37 | pointer-events: none; 38 | } 39 | } 40 | 41 | &.y { 42 | .tick { 43 | line { 44 | stroke: black; 45 | stroke-width: 0.35; 46 | stroke-dasharray: 1 1; 47 | } 48 | text.nodeYLabel { 49 | font-weight: bold; 50 | } 51 | text.focusedReleaseYLabel { 52 | text-decoration: underline; 53 | } 54 | } 55 | } 56 | } 57 | 58 | #modules { 59 | clipPath#clip { 60 | fill: none; 61 | pointer-events: all; 62 | } 63 | 64 | rect.sensor { 65 | fill-opacity: 0; 66 | stroke: grey; 67 | shape-rendering: crispEdges; 68 | } 69 | 70 | line.cursor { 71 | stroke: black; 72 | stroke-width: 0.65; 73 | stroke-dasharray: 1 6; 74 | stroke-opacity: 0.75; 75 | pointer-events: none; 76 | } 77 | } 78 | 79 | .release { 80 | rect { 81 | fill: white; // fallback 82 | fill-opacity: 0.08; 83 | 84 | stroke: black; 85 | stroke-width: 0.16; 86 | stroke-opacity: 0.08; 87 | 88 | cursor: pointer; 89 | 90 | &.current { 91 | fill-opacity: 0.2; 92 | } 93 | 94 | &.focused { 95 | fill-opacity: 0.4; 96 | } 97 | &.pinned { 98 | fill-opacity: 0.6 !important; 99 | } 100 | } 101 | text { 102 | pointer-events: none; 103 | dominant-baseline: middle; 104 | text-anchor: middle; 105 | } 106 | circle { 107 | pointer-events: none; 108 | fill: white; // fallback 109 | fill-opacity: 0; 110 | 111 | stroke: black; // fallback 112 | stroke-width: 3; 113 | stroke-opacity: 1; 114 | 115 | &.hasDeps { 116 | fill-opacity: 1; 117 | } 118 | } 119 | .dimmed { 120 | opacity: 0.35; 121 | } 122 | } 123 | 124 | #depTree { 125 | path.serverSet { 126 | fill: none; 127 | 128 | // fallback 129 | stroke: red; 130 | stroke-width: 5; 131 | } 132 | 133 | line.serverLine { 134 | // fallback 135 | stroke: red; 136 | stroke-width: 5; 137 | } 138 | 139 | line.clientLine { 140 | stroke-width: 0.5; 141 | 142 | // atm this is overridden by code 143 | stroke-dasharray: @clientLineStrokeDasharray; 144 | 145 | // fallback 146 | stroke: black; 147 | } 148 | } 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /src/viz/style/common.less: -------------------------------------------------------------------------------- 1 | .hidden { 2 | display: none !important; 3 | } 4 | 5 | a, 6 | input { 7 | outline: none; 8 | } 9 | -------------------------------------------------------------------------------- /src/viz/style/index.less: -------------------------------------------------------------------------------- 1 | @import "_mixins"; 2 | @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic); 3 | 4 | * { 5 | box-sizing: border-box; 6 | margin: 0; 7 | padding: 0; 8 | } 9 | 10 | html { 11 | color: lighten(black, 15%); 12 | font-family: 'Roboto', sans-serif; 13 | font-weight: 300; 14 | } 15 | 16 | body { 17 | .resolutionBasedGlobalFont; 18 | // .dev_resolutionBasedBkgColor; 19 | } 20 | 21 | html, 22 | body, 23 | #wrapper { 24 | width: 100%; 25 | height: 100%; 26 | } 27 | 28 | #wrapper { 29 | display: flex; 30 | } 31 | 32 | @import "common"; 33 | @import "chart"; 34 | @import "sidebar"; 35 | -------------------------------------------------------------------------------- /src/viz/style/media.less: -------------------------------------------------------------------------------- 1 | // http://blog.scur.pl/2012/06/variable-media-queries-less-css/ 2 | 3 | /* breakpoints */ 4 | 5 | // portrait: mobile, assume 16:9 ratio, so height = width * 16 / 9, rounded 6 | @mobile_S_portrait_max_width: 320px; @mobile_S_portrait_max_height: 570px; 7 | @mobile_M_portrait_max_width: 375px; @mobile_M_portrait_max_height: 670px; 8 | @mobile_L_portrait_max_width: 425px; @mobile_L_portrait_max_height: 756px; 9 | 10 | // portrait: tablet, assume 4:3 ratio, so height = width * 4 / 3, rounded 11 | @tablet_portrait_max_width: 768px; @tablet_portrait_max_height: 1024px; 12 | 13 | // landscape: laptop, assume 16:9 ratio, so height = width * 9 / 16, rounded 14 | @laptop_S_landscape_max_width: 1440px; @laptop_S_landscape_max_width: 810px; 15 | @laptop_M_landscape_max_width: 1920px; @laptop_M_landscape_max_width: 1080px; 16 | 17 | @screen: "only screen"; 18 | @portrait: "(orientation: portrait)"; 19 | @landscape: "(orientation: landscape)"; 20 | @portraitScreen: e("@{screen} and @{portrait}"); 21 | @landscapeScreen: e("@{screen} and @{landscape}"); 22 | 23 | // pixel density 24 | @mdppx: 1.0; 25 | @hdppx: 1.5; 26 | @xhdppx: 2.0; 27 | @xxhdppx: 3.0; 28 | 29 | @mediumDensityScreen: ~"@{screen} and (min-resolution: @{mdppx}dppx) and (max-resolution: @{hdppx}dppx)"; 30 | @highDensityScreen: ~"@{screen} and (min-resolution: @{hdppx}dppx) and (max-resolution: @{xhdppx}dppx)"; 31 | @xhighDensityScreen: ~"@{screen} and (min-resolution: @{xhdppx}dppx) and (max-resolution: @{xxhdppx}dppx)"; 32 | @xxhighDensityScreen: ~"@{screen} and (min-resolution: @{xxhdppx}dppx)"; 33 | 34 | /* media */ 35 | 36 | // portrait 37 | @mobilePortraitS: e("@{portraitScreen} and (max-width: @{mobile_S_portrait_max_width})"); 38 | @mobilePortraitM: e("@{portraitScreen} and (min-width: @{mobile_S_portrait_max_width}) and (max-width: @{mobile_M_portrait_max_width})"); 39 | @mobilePortraitL: e("@{portraitScreen} and (min-width: @{mobile_M_portrait_max_width}) and (max-width: @{mobile_L_portrait_max_width})"); 40 | @tabletPortrait: e("@{portraitScreen} and (min-width: @{mobile_L_portrait_max_width}) and (max-width: @{tablet_portrait_max_width})"); 41 | 42 | // landscape 43 | @mobileLandscapeS: e("@{landscapeScreen} and (max-width: @{mobile_S_portrait_max_height})"); 44 | @mobileLandscapeM: e("@{landscapeScreen} and (min-width: @{mobile_S_portrait_max_height}) and (max-width: @{mobile_M_portrait_max_height})"); 45 | @mobileLandscapeL: e("@{landscapeScreen} and (min-width: @{mobile_M_portrait_max_height}) and (max-width: @{mobile_L_portrait_max_height})"); 46 | @tabletLandscape: e("@{landscapeScreen} and (min-width: @{mobile_L_portrait_max_height}) and (max-width: @{tablet_portrait_max_height})"); 47 | @laptopLandscapeS: e("@{landscapeScreen} and (min-width: @{tablet_portrait_max_height}) and (max-width: @{laptop_S_landscape_max_width})"); 48 | @laptopLandscapeM: e("@{landscapeScreen} and (min-width: @{laptop_S_landscape_max_width}) and (max-width: @{laptop_M_landscape_max_width})"); 49 | @laptopLandscapeL: e("@{landscapeScreen} and (min-width: @{laptop_M_landscape_max_width})"); 50 | 51 | // @media @mobilePortraitS {} 52 | // @media @mobilePortraitM {} 53 | // @media @mobilePortraitL {} 54 | // @media @tabletPortrait {} 55 | // @media @mobileLandscapeS {} 56 | // @media @mobileLandscapeM {} 57 | // @media @mobileLandscapeL {} 58 | // @media @tabletLandscape {} 59 | // @media @laptopLandscapeS {} 60 | // @media @laptopLandscapeM {} 61 | // @media @laptopLandscapeL {} 62 | -------------------------------------------------------------------------------- /src/viz/style/sidebar.less: -------------------------------------------------------------------------------- 1 | @import "_vars"; 2 | @import "_mixins"; 3 | 4 | @sidebarSymbolSize: 1.7em; 5 | @sidebarColorGray: lighten(grey, 40%); 6 | @sidebarColorRepr: grey; 7 | @sidebarStrokeWidthRepr: 0.15em; 8 | 9 | #sidebar { 10 | .resolutionBasedFont; 11 | 12 | flex: 0 0 20em; 13 | overflow-y: auto; 14 | border-left: 0.05em solid @sidebarColorGray; 15 | box-shadow: inset 0.35em 0 0.5em -0.3em lighten(grey, 35%); 16 | 17 | .panel { 18 | box-shadow: -0.35em -0.35em 0.5em -0.3em lighten(grey, 35%); 19 | 20 | > .title { 21 | display: flex; 22 | align-items: center; 23 | justify-content: flex-end; 24 | 25 | padding: 0.5em 1em 0; 26 | } 27 | } 28 | 29 | .card { 30 | padding: 1em; 31 | 32 | &:not(:last-child) { 33 | border-bottom: 0.1em dotted @sidebarColorGray; 34 | } 35 | 36 | h2 { 37 | flex: 0 0 1em; 38 | align-self: flex-start; 39 | font-size: 1.1em; 40 | } 41 | 42 | .row { 43 | display: flex; 44 | align-items: center; 45 | 46 | &:not(:first-child) { 47 | padding-top: 0.75em; 48 | } 49 | 50 | &.title { 51 | // padding: 0; 52 | 53 | h2 { 54 | flex: 1; 55 | font-size: 1.1em; 56 | } 57 | 58 | img { 59 | width: 1.1em; 60 | height: 1.1em; 61 | } 62 | } 63 | 64 | &.keyvalue { 65 | p.key { 66 | flex: 0 0 5em; 67 | font-style: italic; 68 | } 69 | p.value { 70 | flex: 1; 71 | } 72 | } 73 | 74 | &.control { 75 | input[type="radio"], 76 | input[type="checkbox"] { 77 | flex: 0 0 @sidebarSymbolSize; 78 | width: @sidebarSymbolSize / 2; 79 | height: @sidebarSymbolSize / 2; 80 | } 81 | label { 82 | flex: 1; 83 | } 84 | 85 | &.indent { 86 | margin-left: 1.5 * @sidebarSymbolSize; 87 | } 88 | } 89 | 90 | &.legend { 91 | .repr { 92 | width: @sidebarSymbolSize; 93 | height: @sidebarSymbolSize; 94 | // margin: 0.5em; 95 | margin: 0 0.5em; 96 | } 97 | 98 | p.label { 99 | flex: 1; 100 | } 101 | } 102 | 103 | @iconSize: 1.5em; 104 | &.social { 105 | justify-content: center; 106 | 107 | .icon { 108 | flex: 1 1 0; 109 | 110 | display: flex; 111 | justify-content: center; 112 | align-items: center; 113 | 114 | img { 115 | max-width: @iconSize; 116 | } 117 | } 118 | } 119 | } 120 | 121 | .repr { 122 | &.withdeps { 123 | svg { 124 | circle { 125 | fill: @sidebarColorRepr; 126 | stroke: none; 127 | stroke-width: @sidebarStrokeWidthRepr; 128 | } 129 | } 130 | } 131 | &.withoutdeps { 132 | svg { 133 | circle { 134 | fill: none; 135 | stroke: @sidebarColorRepr; 136 | stroke-width: @sidebarStrokeWidthRepr; 137 | } 138 | } 139 | } 140 | &.serversSet, 141 | &.clientLine { 142 | svg { 143 | line { 144 | stroke: @sidebarColorRepr; 145 | } 146 | } 147 | } 148 | &.serversSet { 149 | svg { 150 | line { 151 | stroke-width: @sidebarStrokeWidthRepr; 152 | } 153 | } 154 | } 155 | &.clientLine { 156 | svg { 157 | line { 158 | stroke-width: 1; 159 | stroke-dasharray: @clientLineStrokeDasharray; 160 | } 161 | } 162 | } 163 | } 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /src/viz/templates/analytics.html: -------------------------------------------------------------------------------- 1 | 11 | --------------------------------------------------------------------------------