Skip to content

Instantly share code, notes, and snippets.

View Kameshwaran's full-sized avatar

Kameshwaran Sachithanantham Kameshwaran

View GitHub Profile
@Kameshwaran
Kameshwaran / slim-redux.js
Created May 20, 2020 10:10 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {