dsd-constants-lib
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -136,3 +136,3 @@ /** | ||
names.mandatory.forEach(m => { | ||
if(!paramsObjectToCheck || !paramsObjectToCheck[m]) { | ||
if(!paramsObjectToCheck || paramsObjectToCheck[m] === undefined) { | ||
let p = TypesConvention.findParamConventionByName(methodItem, m); | ||
@@ -150,9 +150,20 @@ absent.push({ name: m, description: TypesConvention.getParamDescription(p) }); | ||
//name = {{mandatory: Array, optional: Array, defaults: Array }} | ||
names.mandatory.forEach(n => { | ||
ret.push(paramObject[n]); | ||
// { ownerId: '0xb9ac1d430841bc99b6c03e772e6f7d755efb1df2', ownerPassword: '12345678', | ||
// publicDescription: 'TAG description', custodians: [], | ||
// title: 'TAG title', encryptedKey: 'TAG encryption key' } | ||
names.all.forEach(n => { | ||
let i = names.optional.indexOf(n); | ||
if(i >= 0) | ||
ret.push(paramObject[n] ? paramObject[n] : names.defaults[i]); | ||
else | ||
ret.push(paramObject[n]); | ||
}); | ||
names.optional.forEach((n, i) => { | ||
ret.push(paramObject[n] ? paramObject[n] : names.defaults[i]); | ||
}); | ||
// names.mandatory.forEach(n => { | ||
// ret.push(paramObject[n]); | ||
// }); | ||
// names.optional.forEach((n, i) => { | ||
// ret.push(paramObject[n] ? paramObject[n] : names.defaults[i]); | ||
// }); | ||
return ret; | ||
@@ -159,0 +170,0 @@ } |
{ | ||
"name": "dsd-constants-lib", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"dependencies": {}, | ||
"scripts": {} | ||
} |
20308
449