compile-linux-mount-options-from-dict-pmb
v0.1.2
Published
Make a comma-separated list from mount options in a dictionary object.
Downloads
16
Readme
compile-linux-mount-options-from-dict-pmb
Make a comma-separated list from mount options in a dictionary object.
API
This module exports one function:
compile(opt)
Where opt
are your mount options, as…
- a string: will be returned as-is.
- any false-y value except empty string: returns
'defaults'
. - an array: returns all truthy elements from that array,
.join()
ed by','
. - or a dictionary object, the actual reason for this module.
Values supported in the dictionary are:
undefined
to ignore that entry- A string
- A number
null
ortrue
to add the option with neither=
nor value.false
to add the option with prefixno
and neither=
nor value.- An array to specify an option multiple times.
Usage
see test/basics.mjs
Known issues
- Needs more/better tests and docs.
License
ISC