stdx
provides additional types and commands to nushell core
and std
git clone https://github.com/1Kinoti/stdx.nu stdx.nu
cd stdx.nu
cp stdx <your desired location>
# to make it globally available, and this to your `config.nu`
use /path/to/stdx
# to make it usable without the `stdx` prefix
use /path/to/stdx *
# to use it in a script/project/library
use /path/to/stdx
stdx
provides an Option
type (also called Maybe
) and a number
of methods associated with it like, map
, is-some
, bind
among others
to use the Option
type
use /path/to/stdx *
Option help
stdx
provides an Result
type and a number of methods associated
with it like, map
, is-ok
, bind
among others
read more about the
Result
type here, here, here and/or here
to use the Result
type
use /path/to/stdx *
Result help
stdx
extends all the available list
methods with the List
type
that provides additional commands like List foldr
, List scanl
etc
and makes some core
list function safer by making them return an Option
instead of an error if they fail, for example
[] | first # errors
[] | List head # returns an `Option None`
contributions are welcome!
use stdx/test; test