Use double quotes

Convert existing mix of double quotes and single quotes to only use
double quotes unless the string contains double quotes.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent efd759bec5
commit 34aaeee354
48 files changed
+708 -712

No files matched your search

+3 -3
View File
@@ -21,7 +21,7 @@ const { basicType } = require("lib/helpers");
function mapToObject(map) {
let obj = {};
for (let [key, value] of map) {
if (typeof key !== 'string') {
if (typeof key !== "string") {
throw new Error(
`Expected all keys to be string but got ${typeof key}`
);
@@ -105,11 +105,11 @@ async function loadJsonArrayAsMap(filePath) {
let map = new Map();
for (let element of parsed) {
if (basicType(element) !== "object") {
throw new Error(`Expected all elements to be objects`);
throw new Error("Expected all elements to be objects");
}
if (element.id === undefined) {
throw new Error(`Expected all elements to have an id property`);
throw new Error("Expected all elements to have an id property");
}
map.set(element.id, element);