-
Squire
- @alexkhismatulin
Pinned Loading
-
react-use-count-down
react-use-count-down PublicDead simple yet powerful countdown hook for React.
-
developit/redaxios
developit/redaxios PublicThe Axios API, as an 800 byte Fetch wrapper.
-
-
Groups array entries based on given ...
Groups array entries based on given path. Uses getProperty function (https://gist.github.com/alexkhismatulin/0dee70114e597a32bcd59c6acc934d79) 1const groupBy = (arr, path) => {
2if (!path || typeof path !== "string") return {}
34return Object.keys(arr).reduce((accum, key) => {
5const value = getProperty(arr[key], path)
-
A simple errors-safe function allowi...
A simple errors-safe function allowing to access properties of objects/arrays by string key like 1const getProperty = (obj, path, defaultValue) => {
2const tokens = path.split(/[.[\]]+/g).filter(Boolean)
34if (!obj || typeof obj !== "object") return defaultValue
5 -
Simple deep cloning function. Works ...
Simple deep cloning function. Works fine with primitive objects/arrays, doesn't work properly with class instances and objects with custom prototypes. 1const isObject = value => typeof value === "object"
23const cloneDeep = (value) => {
4if (!value || !isObject(value)) return value
5
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.