Skip to content

Commit

Permalink
deliberate ES6 syntax
Browse files Browse the repository at this point in the history
(rationale: don't let people install @2 in a build system that will not alert them that we have moved to ES6, only to cause trouble with a later release.)
  • Loading branch information
Fil committed Jun 5, 2020
1 parent cafd1a3 commit bc290e4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/scheme.js
@@ -1,11 +1,5 @@
export default function(ranges) {
ranges = ranges.map(function(colors) {
return colors.match(/.{6}/g).map(function(x) {
return "#" + x;
});
});
var n0 = ranges[0].length;
return function(n) {
return ranges[n - n0];
};
ranges = ranges.map(colors => colors.match(/.{6}/g).map(x => `#${x}`));
const n0 = ranges[0].length;
return n => ranges[n - n0];
}

0 comments on commit bc290e4

Please sign in to comment.