Permalink
Browse files

Remove util dependency

Hey, great module! :) I was wondering if you’d consider removing the util dependency? Reason being, it adds ~20kb to the bundle, and the only method being used, `isArray`, can be [polyfilled](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill) in a couple of lines.
  • Loading branch information...
1 parent 0b6779f commit 4481d95d60ccc730383fbefffa914aac266d771d @michaelrhodes michaelrhodes committed Jan 27, 2015
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/color-harmony.js
@@ -9,7 +9,6 @@
'use strict';
var onecolor = require('onecolor');
-var util = require('util');
var Harmonizer = function () {
var api = this;
@@ -82,7 +81,7 @@ var Harmonizer = function () {
};
api.add = function (harmonyName, degreeArray) {
- if (util.isArray(degreeArray)) {
+ if (Array.isArray(degreeArray)) {
harmonies[harmonyName] = degreeArray;
}
};
@@ -103,7 +102,7 @@ var Harmonizer = function () {
if (harmonies.hasOwnProperty(harmony)) {
harmony = harmonies[harmony];
}
- if (util.isArray(harmony)) {
+ if (Array.isArray(harmony)) {
return harmonize(color, harmony);
} else {
return [];

0 comments on commit 4481d95

Please sign in to comment.