migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
import assert from 'node:assert';
|
||||
import * as database from './database.js';
|
||||
import database from './database.js';
|
||||
|
||||
export {
|
||||
get,
|
||||
set,
|
||||
unset,
|
||||
|
||||
getByAppId,
|
||||
getByName,
|
||||
unsetByAppId,
|
||||
getAppIdByValue,
|
||||
};
|
||||
|
||||
async function set(appId, addonId, env) {
|
||||
assert.strictEqual(typeof appId, 'string');
|
||||
@@ -77,3 +67,14 @@ async function getByName(appId, addonId, namePattern) {
|
||||
if (results.length === 0) return null;
|
||||
return results[0].value;
|
||||
}
|
||||
|
||||
export default {
|
||||
get,
|
||||
set,
|
||||
unset,
|
||||
|
||||
getByAppId,
|
||||
getByName,
|
||||
unsetByAppId,
|
||||
getAppIdByValue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user