Skip to content

Commit

Permalink
Merge pull request #7 from hildjj/readme
Browse files Browse the repository at this point in the history
Update readme.  Add codecov badge.
  • Loading branch information
hildjj authored Feb 26, 2024
2 parents ebbcae4 + 7b174b1 commit 5dd015e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ fromMem(code: string, options: FromMemOptions): Promise<unknown>
export type FromMemOptions = {
/**
* What format does the code have? "guess" means to read the closest
* package.json file looking for the "type" key. Default: "commonjs".
* package.json file looking for the "type" key.
* Default: "commonjs".
*/
format?: "bare" | "commonjs" | "es" | "globals" | "guess";
/**
* What is the fully-qualified synthetic
* filename for the code? Most important is the directory, which is used to
* find modules that the code import's or require's.
* What is the fully-qualified synthetic filename for the code? Most
* important is the directory, which is used to find modules that the
* code import's or require's.
*/
filename: string;
/**
* Variables to make availble in the global
* scope while code is being evaluated.
* Variables to make availble in the global scope while code is being evaluated.
*/
context?: object;
/**
Expand All @@ -63,10 +63,19 @@ export type FromMemOptions = {
*/
includeGlobals?: boolean;
/**
* For type "globals", what name is
* exported from the module?
* For type "globals", what name is exported from the module?
*/
globalExport?: string;
/**
* Specifies the line number offset that is displayed in stack traces
* produced by this script.
*/
lineOffset?: number | undefined;
/**
* Specifies the first-line column number ffset that is displayed in stack
* traces produced by this script.
*/
columnOffset?: number | undefined;
};
```

Expand All @@ -79,3 +88,4 @@ for node for the moment. Hopefully, we will track changes to the API as they
happen.

[![Tests](https://github.com/peggyjs/from-mem/actions/workflows/node.js.yml/badge.svg)](https://github.com/peggyjs/from-mem/actions/workflows/node.js.yml)
[![codecov](https://codecov.io/gh/peggyjs/from-mem/graph/badge.svg?token=CWQ7GSH0ZI)](https://codecov.io/gh/peggyjs/from-mem)

0 comments on commit 5dd015e

Please sign in to comment.