Skip to content

Commit

Permalink
Remove ES6 Map polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 20, 2015
1 parent 34627b6 commit 943dfd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-scale",
"version": "0.1.1",
"version": "0.1.2",
"description": "Encodings that map abstract data to visual representation.",
"keywords": [
"d3",
Expand All @@ -20,12 +20,12 @@
"url": "https://github.com/d3/d3-scale.git"
},
"scripts": {
"pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=scale -- index.js > build/scale.js",
"pretest": "mkdir -p build && d3-bundler --format=umd --name=scale -- index.js > build/scale.js",
"test": "TZ=America/Los_Angeles faucet `find test -name '*-test.js'`",
"prepublish": "npm run test && uglifyjs build/scale.js -c -m -o build/scale.min.js && rm -f build/scale.zip && zip -j build/scale.zip -- LICENSE README.md build/scale.js build/scale.min.js"
},
"devDependencies": {
"d3-arrays": "~0.0.4",
"d3-arrays": "~0.1.1",
"d3-bundler": "~0.2.5",
"d3-color": "~0.2.6",
"d3-format": "~0.3.3",
Expand Down
4 changes: 3 additions & 1 deletion src/ordinal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {map} from "d3-arrays";

function steps(length, start, step) {
var steps = new Array(length), i = -1;
while (++i < length) steps[i] = start + step * i;
Expand All @@ -21,7 +23,7 @@ function newOrdinal(domain, ranger) {
scale.domain = function(x) {
if (!arguments.length) return domain.slice();
domain = [];
index = new Map;
index = map();
var i = -1, n = x.length, xi, xk;
while (++i < n) if (!index.has(xk = (xi = x[i]) + "")) index.set(xk, domain.push(xi));
return scale[ranger.t].apply(scale, ranger.a);
Expand Down

0 comments on commit 943dfd2

Please sign in to comment.