Skip to content

Commit

Permalink
Remove indexOf dep
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Apr 13, 2018
1 parent db8f286 commit 0d9bd4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
var indexOf = require('component-indexof');

var indexOf = function (xs, item) {
if (xs.indexOf) return xs.indexOf(item);
else for (var i = 0; i < xs.length; i++) {
if (xs[i] === item) return i;
}
return -1;
};
var Object_keys = function (obj) {
if (Object.keys) return Object.keys(obj)
else {
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"browser",
"eval"
],
"dependencies": {
"component-indexof": "0.0.3"
},
"dependencies": {},
"devDependencies": {
"browserify": "^16.1.1",
"tape": "~2.3.2",
Expand Down

0 comments on commit 0d9bd4c

Please sign in to comment.