Allow selection of blueprints type and grade

This commit is contained in:
Cmdr McDonald
2017-01-20 17:53:49 +00:00
parent 029ba63aa5
commit 0be59af9b0
2 changed files with 54 additions and 7 deletions

View File

@@ -71,3 +71,15 @@ export function shallowEqual(objA, objB) {
export function fromUrlSafe(data) {
return data ? data.replace(/-/g, '/').replace(/_/g, '+') : null;
}
/**
* Check if an object is empty
* @param {object} obj the object
* @return {bool} true if the object is empty, otherwise false
*/
export function isEmpty(obj) {
for (let key in obj) {
if (obj.hasOwnProperty(key)) return false;
}
return true;
};