Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 132d510

Browse files
authored
Merge pull request #14 from netlify/raees/plainobject
Use lodash.isPlainObject
2 parents 970a4e8 + d91193d commit 132d510

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

common.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const isPlainObj = require('lodash.isplainobject')
12
let URLclass = null
23

34
function parseURL(url) {
@@ -20,10 +21,6 @@ function splatForwardRule(path, obj, dest) {
2021
)
2122
}
2223

23-
function isPlainObj(o) {
24-
return typeof o == 'object' && o.constructor == Object
25-
}
26-
2724
function fetch(obj, options) {
2825
for (const i in options) {
2926
if (obj.hasOwnProperty(options[i])) {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"author": "Netlify",
1515
"license": "MIT",
1616
"dependencies": {
17-
"@netlify/config": "^0.11.1"
17+
"@netlify/config": "^0.11.1",
18+
"lodash.isplainobject": "^4.0.6"
1819
},
1920
"devDependencies": {
2021
"auto-changelog": "^1.13.0",

0 commit comments

Comments
 (0)