summaryrefslogtreecommitdiff
path: root/bundle/utils.ts
diff options
context:
space:
mode:
authorAxetroy <axetroy.dev@gmail.com>2019-09-12 11:31:23 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-09-11 23:31:23 -0400
commit878a9a29e77bcaedd4242618ccf57d1be7dfd7d8 (patch)
tree53fd448fa9cf0295c2498f4f7970f1a720435dcc /bundle/utils.ts
parent08087e921ede553d1eaeb682d264c3d4c217a3cd (diff)
bump prettier to 1.18.2 (denoland/deno_std#592)
Original: https://github.com/denoland/deno_std/commit/06958a4ada960665a48ac34f919423e0d8d16951
Diffstat (limited to 'bundle/utils.ts')
-rw-r--r--bundle/utils.ts24
1 files changed, 11 insertions, 13 deletions
diff --git a/bundle/utils.ts b/bundle/utils.ts
index 80b00b6fa..1df78b1f5 100644
--- a/bundle/utils.ts
+++ b/bundle/utils.ts
@@ -69,20 +69,18 @@ export function instantiate(
assert(module != null);
assert(module.factory != null);
- const dependencies = module.dependencies.map(
- (id): object => {
- if (id === "require") {
- // TODO(kitsonk) support dynamic import by passing a `require()` that
- // can return a local module or dynamically import one.
- return (): void => {};
- } else if (id === "exports") {
- return module.exports;
- }
- const dep = modules.get(id)!;
- assert(dep != null);
- return dep.exports;
+ const dependencies = module.dependencies.map((id): object => {
+ if (id === "require") {
+ // TODO(kitsonk) support dynamic import by passing a `require()` that
+ // can return a local module or dynamically import one.
+ return (): void => {};
+ } else if (id === "exports") {
+ return module.exports;
}
- );
+ const dep = modules.get(id)!;
+ assert(dep != null);
+ return dep.exports;
+ });
if (typeof module.factory === "function") {
module.factory!(...dependencies);