json-formater
Advanced tools
Comparing version 0.1.0 to 0.9.1
@@ -126,3 +126,3 @@ module.exports = function(expected_param, actual_param, fill_obj_param, callback_param) { | ||
//if expected param not an object - simply compare | ||
if (typeof expected_param != 'object') { | ||
if (typeof expected_param != 'object' || !actual_param) { | ||
callback_param(expected_param === actual_param); | ||
@@ -136,2 +136,2 @@ //if expected param key count is zero - return true | ||
} | ||
} |
{ | ||
"name": "json-formater", | ||
"version": "0.1.0", | ||
"version": "0.9.1", | ||
"description": "Node.js JSON data formater / comparator", | ||
"preferGlobal": "true", | ||
"main": "json-formater.js", | ||
"author": "Aivis Silins", | ||
"keywords": ["json", "json format", "json comparator", "json formater", "json comparator"], | ||
"repository" : { | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/aivis/json-formater.git" | ||
}, | ||
"engines": { "node": "*" } | ||
} | ||
"scripts": { | ||
"test": "make test" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.11.0" | ||
}, | ||
"engines": { | ||
"node": "*" | ||
} | ||
} |
json-formater | ||
============= | ||
### Version: 0.1 ### | ||
### Version: 0.9.0 ### | ||
@@ -18,3 +18,3 @@ Node.js JSON data formater / comparator | ||
------- | ||
... | ||
```npm install json-formater``` | ||
@@ -21,0 +21,0 @@ Usage |
var formater = require('./../json-formater'); | ||
describe('simple tests', function(){ | ||
it('#1 two identical bool compare', function(done){ | ||
@@ -553,2 +553,28 @@ | ||
}); | ||
it('obj and false', function(done){ | ||
formater({key:1}, false, function(isMatch){ | ||
if (isMatch) { | ||
throw 'must be false'; | ||
} | ||
done(); | ||
}); | ||
}); | ||
it('obj and null', function(done){ | ||
formater({key:1}, null, function(isMatch){ | ||
if (isMatch) { | ||
throw 'must be false'; | ||
} | ||
done(); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23356
10
650
1