Skip to content

Instantly share code, notes, and snippets.

@DrBoolean
Created May 29, 2016 20:20
Show Gist options
  • Select an option

  • Save DrBoolean/a3cadec41b6f110eb60ecc8e69bc0784 to your computer and use it in GitHub Desktop.

Select an option

Save DrBoolean/a3cadec41b6f110eb60ecc8e69bc0784 to your computer and use it in GitHub Desktop.
task_sketch7.js
const associateRels = fixs => attrs =>
attrs.traverse(Id.of, (attr, name) =>
name.match(/_id$/)
? Id.of(attr.split('.').reduce((acc, p) => acc.get(p), fixs))
: Id.of(attr))
const createRecord = tablename => attrs =>
Id.of(Object.assign({id: Math.random(2)}, attrs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment