When the exported "thing" is a function (async or not), it is executed passing command line parameters if given.
Imagine a simple ES module library (myLib.js):
```javascript
export default function hello()
{
console.log( 'Hello world !' )
}
export function greet( params ) {
return `Hello ${params[0]}`
}
```
Then you can write:
```bash
esm myLib
> Hello world !
```
```bash
esm myLib:greet Pierre
> Hello Pierre !!
```
### Promise/async support
If the returned result is a promise, because explicitly returned, or from an async function, esm-cli will take care of waiting it's resolution returning the resolved value (gently catching rejections showing nothing).
### Parameters parsing
Command line parameters are parsed into an Array before it is given to a called function.
This Array contains a list of strings corresponding to each string given without hyphen `-`:
(myLib.js)
```javascript
export function showParams( params )
{
console.log( params )
}
```
```bash
esm myLib:showParams param1 param2 param3
> [ "param1", "param2", "param3" ]
```
... and this array is augmented with properties corresponding to hyphen params, with value or "true" if not: