Skip to content

Commit

Permalink
Remove superfluous dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 13, 2017
1 parent 6456e92 commit 96bfa23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

/* Dependencies. */
var has = require('has');
var visit = require('unist-util-visit');
var normalize = require('nlcst-normalize');
var isLiteral = require('nlcst-is-literal');

var own = {}.hasOwnProperty;

/* Expose. */
module.exports = search;

Expand Down Expand Up @@ -112,7 +113,7 @@ function search(tree, phrases, handler, options) {
}

word = normalize(node, config);
phrases = has(byWord, word) ? byWord[word] : [];
phrases = own.call(byWord, word) ? byWord[word] : [];
length = phrases.length;
index = -1;

Expand All @@ -129,7 +130,7 @@ function search(tree, phrases, handler, options) {
function handlePhrase(phrase) {
firstWord = normalize(phrase.split(C_SPACE, 1)[0], config);

if (has(byWord, firstWord)) {
if (own.call(byWord, firstWord)) {
byWord[firstWord].push(phrase);
} else {
byWord[firstWord] = [phrase];
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"index.js"
],
"dependencies": {
"has": "^1.0.1",
"nlcst-is-literal": "^1.1.0",
"nlcst-normalize": "^2.1.0",
"unist-util-visit": "^1.0.0"
Expand Down

0 comments on commit 96bfa23

Please sign in to comment.