Do Radians right

This commit is contained in:
Daniel Odendahl Jr
2017-09-02 00:37:46 +00:00
parent 36fcc4db33
commit 7789dab718
5 changed files with 9 additions and 8 deletions
+2 -1
View File
@@ -62,7 +62,8 @@ class Util {
}
static list(arr, conj = 'and') {
return `${arr.slice(0, -1).join(', ')}${arr.length > 1 ? `${arr.length > 2 ? ',' : ''} ${conj} ` : ''}${arr.slice(-1)}`; // eslint-disable-line max-len
const { length } = arr;
return `${arr.slice(0, -1).join(', ')}${length > 1 ? `${length > 2 ? ',' : ''} ${conj} ` : ''}${arr.slice(-1)}`;
}
static shorten(text, maxLen = 2000) {