Skip to content

Instantly share code, notes, and snippets.

View karansapolia's full-sized avatar
🛠️
Building

Karan Sapolia karansapolia

🛠️
Building
View GitHub Profile
@karansapolia
karansapolia / slim-redux.js
Created November 2, 2019 02:36 — 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])) {