Skip to content

Commit 49a0ee6

Browse files
committed
remove isobject module
1 parent 923b16a commit 49a0ee6

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
var htmlparser = require('htmlparser2');
4-
var isObject = require('isobject');
54
var objectAssign = require('object-assign');
65

76
/**
@@ -120,7 +119,10 @@ function parserWrapper() {
120119
return postHTMLParser(html, opt);
121120
}
122121

123-
if (arguments.length === 1 && isObject(arguments[0])) {
122+
if (arguments.length === 1 &&
123+
arguments[0] !== null &&
124+
typeof arguments[0] === 'object' &&
125+
Array.isArray(arguments[0]) === false) {
124126
option = arguments[0];
125127
return parser;
126128
}

package-lock.json

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"homepage": "https://github.com/posthtml/posthtml-parser#readme",
2727
"dependencies": {
2828
"htmlparser2": "^3.9.2",
29-
"isobject": "^2.1.0",
3029
"object-assign": "^4.1.1"
3130
},
3231
"devDependencies": {

0 commit comments

Comments
 (0)