@fink/require-hook
v6.3.1
Published
Run fink modules in node.
Downloads
10
Readme
require-hook
Run fink modules in node.
Example file ./foobar.fnk
:
{log} = console
main = fn:
log:: `hello world`
match require.main:
module: main()
Run it using:
node -r '@fink/require-hook' ./foobar.fnk
Or use it from within another javascript module e.g. ./shrub.js
:
import '@fink/require-hook'
import {main} from './foobar.fnk'
main();