Skip to content

Commit

Permalink
Merge pull request #3 from hildjj/readme
Browse files Browse the repository at this point in the history
Fix readme bugs
  • Loading branch information
hildjj authored Feb 17, 2024
2 parents 73deaf0 + 7127ef3 commit 859b879
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ npm install @peggyjs/from-mem
## Usage

```js
const fromMem = require("@peggyjs/from-mem");
const mod = fromMem(`
import fromMem from "@peggyjs/from-mem"; // or require("@peggyjs/from-mem")
const mod = await fromMem(`
import foo from "../foo.js" // Loads ./test/foo.js
export function bar() {
return foo() + 2;
}
`, {
filename: path.join(__dirname, "test", "fixtures", "test.js"),
format: "es",
})
});
mod.bar();
```

Expand Down

0 comments on commit 859b879

Please sign in to comment.