Initial commit
This commit is contained in:
6
src/common/utils/ensure.js
Normal file
6
src/common/utils/ensure.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports.notNullOrEmpty = function(value, name) {
|
||||
if (value === null)
|
||||
throw new Error(name + " is null.");
|
||||
if (value === '')
|
||||
throw new Error(name + " is empty.");
|
||||
};
|
Reference in New Issue
Block a user