fix indentation

This commit is contained in:
Nick Sweeting 2021-05-19 01:41:22 -04:00 committed by GitHub
parent 4a6a3dfc36
commit a6162f7142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -6,13 +6,14 @@ const { randomBytes } = require('crypto');
convict.addFormat({
name: 'positive-int-array',
validate: (ints, schema) => {
ints.forEach(int => {
if (isNaN(int) || int < 0)
for (const int of ints) {
if (isNaN(int) || int < 0)
throw new Error('must be a comma-separated list of positive integers')
})
}
},
coerce: (ints_str, schema) => {
return ints_str.trim().split(',').map(int_str => parseInt(int_str.trim(), 10))
},
coerce: (ints_str, schema) =>
ints_str.trim().split(',').map(int_str => parseInt(int_str.trim(), 10))
});
const conf = convict({