Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 3, 2022
1 parent 27140aa commit 4c7ddcf
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -323,17 +323,26 @@ Outputs:
Same as `findExports` but returns array of export names.
```js
import { findExports } from 'mlly'
import { findExportNames } from 'mlly'

// [ "foo", "bar", "baz", "default" ]
console.log(findExports(`
console.log(findExportNames(`
export const foo = 'bar'
export { bar, baz }
export default something
`))
```
##
## `resolveModuleExportNames`
Resolves module and reads its contents to extract possible export names using static analyzes.
```js
import { resolveModuleExportNames } from 'mlly'

// ["basename", "dirname", ... ]
console.log(await resolveModuleExportNames('pathe'))
```
## Evaluating Modules
Expand Down

0 comments on commit 4c7ddcf

Please sign in to comment.