DevSnicket Eunice is a toolkit based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Euince's approach isn't limited to direct dependencies, but includes indirect dependencies as well.
Call when process entry point
This package detects when its callee is the process entry point (e.g. from CLI and scripts), and makes arguments and standard input available to a function.
It depends upon minimist to parse the arguments.
npm install @devsnicket/eunice-call-when-process-entry-point
yarn add @devsnicket/eunice-call-when-process-entry-point