Skip to content

Commit

Permalink
Use ESM for monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 5, 2022
1 parent 630b34e commit 5f2b26a
Show file tree
Hide file tree
Showing 96 changed files with 1,028 additions and 1,056 deletions.
18 changes: 9 additions & 9 deletions dictionaries/bg/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/br/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/ca-valencia/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/ca/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/cs/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/da/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/de-AT/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/de-CH/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/de/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/el-polyton/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions dictionaries/el/index.js
@@ -1,26 +1,26 @@
var read = require('fs').readFile
var join = require('path').join
const fs = require('fs')
const path = require('path')

module.exports = load

function load(callback) {
var pos = -1
var exception = null
var result = {}
let result = {}
let pos = -1
let exception

one('aff')
one('dic')

function one(name) {
read(join(__dirname, 'index.' + name), function (error, doc) {
fs.readFile(path.join(__dirname, 'index.' + name), (error, doc) => {
pos++
exception = exception || error
result[name] = doc

if (pos) {
callback(exception, exception ? null : result)
exception = null
result = null
callback(exception, exception ? undefined : result)
exception = undefined
result = undefined
}
})
}
Expand Down

0 comments on commit 5f2b26a

Please sign in to comment.