Release 5.0.0
Version 5.0 brings in some major changes, the first LTS version and huge improvements over previous versions.
_What's new?_
- A new way to validate is here!
msngr.is(input,...)
allows any amount of parameters to validate. The object returned withmsngr.is()
provides multiple ways to checking the type(s) of objects supplied through familiar properties. For instance:
msngr.is("My String").string; // Returns true
msngr.is(" ").empty; // Returns true
msngr.is(undefined).there; // Returns false
msngr.is("one", "another", "weee").string; // Returns true
- A new way to setup middleware now exists and replaces the previous options.
- A new
msngr.safe(obj, prop, default)
method was added for accessing deep properties, safely.
_Breaking changes_
- All previously used type, existence and empty checking methods are now removed in favor of the new
msngr.is()
way. msngr(msg).subscribers
has been renamed tomsngr(msg).handlers
to better reflect the msngr terminology.msngr(msg).options
has been axed in favor of the new middleware concept outlined in the above section.- Options have been removed entirely along with their specific implementations. This has been replaced by a middleware setup with currently no default middlewares.
msngr.merge()
now has different, better behavior. No longer tries to merge strings and has a very strict set of rules easy to see in the source code.msngr.copy()
was changed in a very similar way
_Misc changes_
- Highly revised documentation. This is still ongoing.
- Vastly refactored