Convert backend code to ES modules
Bundling code now with Rollup for its flat bundling and tree shaking support. Front end code still goes through Webpack for browser support.
This commit is contained in:
1 parent
824639976f
commit
1e41c72d60
62 files changed
+718
-898
No files matched your search
@@ -1,11 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
const validators = {
|
||||
pass: require("./validators/pass"),
|
||||
test: require("./validators/test")
|
||||
};
|
||||
import pass from "./validators/pass";
|
||||
import test from "./validators/test";
|
||||
|
||||
class Authorizer {
|
||||
const validators = { pass, test };
|
||||
|
||||
export default class Authorizer {
|
||||
constructor(permissionSets) {
|
||||
this.permissionSets = permissionSets;
|
||||
this.validatorCache = new WeakMap();
|
||||
@@ -77,5 +77,3 @@ class Authorizer {
|
||||
return validator;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Authorizer;
|
||||
Reference in new issue
Block a user