@undici-plus/export
v1.0.1
Published
Managing the `module.exports` object more easier
Downloads
259
Readme
@undici-plus/export
Managing the module.exports object more easier
exportAny()
This function lets you export anything
ARGUMENTS
name: The name of the export, ignored ifdefis trueexported: The exported objectmoduleObject: The module of your projectdef(OPTIONAL): Specifies if the export is named or default
USE
math.ts
import exportAny from "@undici-plus/export"
function add(a: number, b: number){
return a + b
}
exportAny("add", add, module)main.ts
import { add } from "./math.ts"
add(2, 3) // 5Q&A
Question 1
Q: Has this been tested? A: Sadly, no.
Question 2
Q: Does this work? A: I hope so...
