Skip to content

Instantly share code, notes, and snippets.

@WaldoJeffers
Last active May 26, 2018 18:16
Show Gist options
  • Save WaldoJeffers/4aa3bb110f9a5ebc549d5ab78e8dd214 to your computer and use it in GitHub Desktop.
Save WaldoJeffers/4aa3bb110f9a5ebc549d5ab78e8dd214 to your computer and use it in GitHub Desktop.
Reduce an object with conductor
import { reduce } from 'conductor'
const obj = { books: 10, ruler: 1, pencils: 5 }
const add = (a, b) => a + b
const total = reduce(add, 0, obj) // 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment