mancha 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,5 +4,5 @@ export declare function renderLocalPath(fpath: string, vars?: {
4
4
  }, encoding?: BufferEncoding): Promise<string>;
5
5
  export declare function renderContent(content: string, vars?: {
6
6
  [key: string]: string;
7
- }, fsroot?: string, maxdepth?: number): Promise<string>;
7
+ }, fsroot?: string | null, maxdepth?: number): Promise<string>;
8
8
  export { preprocess, renderRemotePath, encodeHtmlAttrib, decodeHtmlAttrib } from "./web";
package/dist/index.js CHANGED
@@ -20,8 +20,9 @@ function renderLocalPath(fpath, vars = {}, encoding = "utf8") {
20
20
  });
21
21
  }
22
22
  exports.renderLocalPath = renderLocalPath;
23
- function renderContent(content, vars = {}, fsroot = ".", maxdepth = 10) {
23
+ function renderContent(content, vars = {}, fsroot = null, maxdepth = 10) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
+ fsroot = fsroot || ".";
25
26
  return (0, web_1.renderContent)(content, vars, fsroot, maxdepth, renderLocalPath);
26
27
  });
27
28
  }