- types: add missing
Collect
export
- documentation fix
- integer properties are now always treated as indices rather than only when the object is an array
collect
is called for indexed access to non-arrays as well as for wildcard matches against them
- for indexed properties,
collect
is passed the index as a second argument (omitted for wildcard matches) - the return value of
collect
can be an array-like for indexed access rather than the full array required for wildcard matches
- remove unused dev dependency
get
andgetter
no longer support an (optional) default-value override, i.e. they now behave likepluck
andplucker
- remove
pluck
andplucker
- drop support for EOL Node.js versions (i.e. Node.js v10)
- the return type of
get
can be supplied as a type parameter
- fix coercion of undefined to the default value in trailing wildcards
- relicense: Artistic 2.0 -> MIT
- type fix: revert the
any
->unknown
change to avoid requiring casts
- get-wild/fp: add unary variants of
get
(pluck
) and getter (plucker
) - speed up path parsing: replace
String#replace
withRegExp#exec
(~1.6 times faster)
- use package.exports to declare entries
- add curried (data last) versions of
get
andgetter
viaget-wild/fp
- add
exports.parse
as an alias forexports.parser
- fix a bug which caused custom
collect
,map
andflatMap
settings to be forgotten after the first wildcard match
- types: narrow
get
's return type fromany
tounknown
- add
exports.split
as an alias forexports.parser
- add
options.split
as an alias foroptions.parser
- allow
parser
to accept a string as a shortcut forpath => path.split(string)
- remove superfluous file from the package
- allow the path to be a single number or symbol
- type tweaks
- type fixes
- add a
collect
option to customize value extraction
- speed up wildcard matching
- add a
default
option to bake in the default value - speed up array globbing
- documentation fix
- parser:
- add missing backslash (\) to the list of excluded name characters
- portability fix: replace lookbehind assertion (not supported on Safari) with lookahead
- initial release