A pico sized (~ 7kb) with zero dependency javascript library for commonly overlooked utility functions for both nodejs and the browser.
this library goes well with commonly used libraries such as lodash and react with little or no overlapping.
Below are the main features
A data driven data validator, suitable for simple to very complicated data structure. all you need is
- define a schema/specification of your data
- pass the schema and your data to the validator
- it returns the result
Like Object.assign but it does deep merging for object and array
building something like express router? this function can help you
/pico/common/str/route
+/pico/:lib/:mod/:fun
-> {lib: 'common', mod: 'str', fun: 'route}
/pico/:lib/:mod/:fun
+ {lib: 'common', mod: 'str', fun: 'route} ->/pico/common/str/route
Need a cron schedule expressions parser? this is a pure javascript implementation can run on the browsers and nodejs. designed to work with setTimeout
expect('style').is.very.hard.to.remember.and.use('?'). Javascript operators is all you need.
this framework supported serial and pararellel test cases execution.
A list of functions to you help to build your own sandbox module/dependency with asynchronous loader (similar to AMD)
printing javascript function call stack? this is for you
these parse and stringify functions are designed to avoid unnecessary json stringify and parse and stringify-again in your workflow
for example
- A frontend stringified a big data structure for a request body
- expressjs bodyparser parsed entire request body but only part of them are use in server-side logic
- backend's model stringified part of the request body again and save it to db
with these functions
- frontend specially stringify the server needed data and db needed data in one string
- backend only parse backend needed data for server-side logic
- database needed can be saved as it is to db without stringification
xpath for json
A data driven optional chaining, a optional chaining that can be saved and transport over network
A 23 LOC html template engine
click here browser and nodejs installation instruction