Skip to content

Commit 55df724

Browse files
committed
Format the code
1 parent ca4979e commit 55df724

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ function escapeUnsafeChars(unsafeChar) {
3232
}
3333

3434
function deleteFunctions(obj){
35-
var functionKeys = []
36-
for(var key in obj){
37-
if(typeof obj[key] === 'function'){
38-
functionKeys.push(key);
39-
}
35+
var functionKeys = [];
36+
for (var key in obj) {
37+
if (typeof obj[key] === "function") {
38+
functionKeys.push(key);
39+
}
4040
}
41-
for(var i=0; i<functionKeys.length; i++){
42-
delete obj[functionKeys[i]]
41+
for (var i = 0; i < functionKeys.length; i++) {
42+
delete obj[functionKeys[i]];
4343
}
4444
}
4545

@@ -143,8 +143,8 @@ module.exports = function serialize(obj, options) {
143143
}
144144

145145
// Check if the parameter is function
146-
if( options.ignoreFunction && typeof obj==='function'){
147-
obj = undefined;
146+
if (options.ignoreFunction && typeof obj === "function") {
147+
obj = undefined;
148148
}
149149
// Protects against `JSON.stringify()` returning `undefined`, by serializing
150150
// to the literal string: "undefined".

0 commit comments

Comments
 (0)