Skip to content

Commit 7aa9dfe

Browse files
committed
Remove dependency
1 parent 044dfb3 commit 7aa9dfe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/nest.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict';
22

33
var zwitch = require('zwitch');
4-
var has = require('has');
54

65
module.exports = zwitch('nestingOperator');
76

7+
var own = {}.hasOwnProperty;
8+
89
var handle = module.exports;
910
var handlers = handle.handlers;
1011

@@ -199,7 +200,7 @@ function createTypeIndex() {
199200

200201
index.elements++;
201202

202-
if (!has(counts, type)) {
203+
if (!own.call(counts, type)) {
203204
counts[type] = 0;
204205
}
205206

@@ -208,6 +209,6 @@ function createTypeIndex() {
208209
}
209210

210211
function count(node) {
211-
return has(counts, node.tagName) ? counts[node.tagName] : 0;
212+
return own.call(counts, node.tagName) ? counts[node.tagName] : 0;
212213
}
213214
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"camelcase": "^3.0.0",
2424
"comma-separated-tokens": "^1.0.2",
2525
"css-selector-parser": "^1.3.0",
26-
"has": "^1.0.1",
2726
"hast-util-has-property": "^1.0.0",
2827
"hast-util-is-element": "^1.0.0",
2928
"hast-util-whitespace": "^1.0.0",

0 commit comments

Comments
 (0)