From 6d13aa13973beeb3bcccc76a0a1307cf1636125f Mon Sep 17 00:00:00 2001 From: Lee Yi Date: Wed, 13 Sep 2023 17:54:55 +0800 Subject: [PATCH] Make stringify available to modules (#1486) --- src/modules/requireProvider.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/requireProvider.ts b/src/modules/requireProvider.ts index 513c9e3b7..1d4cc1d9b 100644 --- a/src/modules/requireProvider.ts +++ b/src/modules/requireProvider.ts @@ -2,6 +2,7 @@ import * as jsslang from '..' import * as stdlib from '../stdlib' import type { Context } from '../types' import * as types from '../types' +import * as stringify from '../utils/stringify' /** * Returns a function that simulates the job of Node's `require`. The require @@ -23,7 +24,10 @@ export const getRequireProvider = (context: Context) => (x: string) => { ...jsslang, dist: { stdlib, - types + types, + utils: { + stringify + } }, context }