diff --git a/src/enforcers.js b/src/enforcers.js index 9fae90c..d87c13a 100644 --- a/src/enforcers.js +++ b/src/enforcers.js @@ -15,7 +15,7 @@ function toArray (value) { return isArray(value) ? value : [value] } -export let setup = osom({ +export const setup = osom({ client: { type: String, default: 'sqlite3', diff --git a/src/helpers.js b/src/helpers.js index 0b6446d..91835e0 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -150,7 +150,7 @@ function findKey (schema) { let hasIncrements = false for (const name in schema) { if (!schema.hasOwnProperty(name)) continue - let props = schema[name] + const props = schema[name] if (props === 'increments' || props.type === 'increments') { key = name hasIncrements = true diff --git a/src/index.js b/src/index.js index 6111756..3195011 100644 --- a/src/index.js +++ b/src/index.js @@ -85,7 +85,7 @@ class Trilogy { return false } - let query = this.knex.schema.hasTable(name) + const query = this.knex.schema.hasTable(name) return runQuery(this, query, true) } diff --git a/src/sqljs-handler.js b/src/sqljs-handler.js index 912af72..7f08075 100644 --- a/src/sqljs-handler.js +++ b/src/sqljs-handler.js @@ -16,7 +16,7 @@ export function readDatabase (instance) { try { makeDirPath(dirname(filename)) - let file = readFileSync(filename) + const file = readFileSync(filename) client = new SQL.Database(file) } catch (e) { if (e.code === 'ENOENT') { diff --git a/src/util.js b/src/util.js index 14b60c3..8aa0338 100644 --- a/src/util.js +++ b/src/util.js @@ -31,7 +31,7 @@ export function isOneOf (array, value) { return array.some(v => v === value) } -export let isType = (value, kind) => { +export const isType = (value, kind) => { if (!kind) return type(value) return type(value) === kind.toLowerCase() }