Coding style fixes and improvements

This commit is contained in:
Angelos Chalaris
2018-02-04 18:07:31 +02:00
parent 1006da6fa5
commit 91ca70000d
8 changed files with 9 additions and 9 deletions

View File

@ -116,7 +116,7 @@ try {
for (let tag of [...new Set(Object.entries(tagDbData).map(t => t[1][0]))]
.filter(v => v)
.sort((a, b) => a.localeCompare(b))) {
if (capitalize(tag, true) == 'Uncategorized') {
if (capitalize(tag, true) === 'Uncategorized') {
uncategorizedOutput +=
`<h3>` +
md

View File

@ -12,7 +12,7 @@ test('Testing bindAll', (t) => {
}
};
bindAll(view, 'click');
t.equal(view.click(), 'clicked docs', 'Binds to an object context')
t.equal(view.click(), 'clicked docs', 'Binds to an object context');
//t.deepEqual(bindAll(args..), 'Expected');
//t.equal(bindAll(args..), 'Expected');
//t.false(bindAll(args..), 'Expected');

View File

@ -15,7 +15,7 @@ test('Testing chunk', (t) => {
t.throws(() => chunk(null), 'chunk(null) throws an error');
let start = new Date().getTime();
chunk('This is a string', 2)
chunk('This is a string', 2);
let end = new Date().getTime();
t.true((end - start) < 2000, 'chunk(This is a string, 2) takes less than 2s to run');
t.end();

View File

@ -9,7 +9,7 @@ test('Testing collectInto', (t) => {
let p1 = Promise.resolve(1);
let p2 = Promise.resolve(2);
let p3 = new Promise(resolve => setTimeout(resolve, 2000, 3));
Pall(p1, p2, p3).then(function(val){ t.deepEqual(val, [1,2,3], 'Works with multiple promises')}, function(reason){});
Pall(p1, p2, p3).then(function(val){ t.deepEqual(val, [1,2,3], 'Works with multiple promises');}, function(reason){});
//t.deepEqual(collectInto(args..), 'Expected');
//t.equal(collectInto(args..), 'Expected');
//t.false(collectInto(args..), 'Expected');

View File

@ -1,2 +1,2 @@
const isArrayBuffer = val => val instanceof ArrayBuffer;
module.exports = isArrayBuffer
module.exports = isArrayBuffer;

View File

@ -1,2 +1,2 @@
const isRegExp = val => val instanceof RegExp;
module.exports = isRegExp
module.exports = isRegExp;

View File

@ -1,2 +1,2 @@
const isSet = val => val instanceof Set;
module.exports = isSet
module.exports = isSet;

View File

@ -15,7 +15,7 @@ test('Testing toKebabCase', (t) => {
t.throws(() => toKebabCase(123), 'toKebabCase(123) throws an error');
let start = new Date().getTime();
toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML')
toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML');
let end = new Date().getTime();
t.true((end - start) < 2000, 'toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run');
t.end();