Skip to content

Instantly share code, notes, and snippets.

@lambdatastic
Last active October 25, 2016 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lambdatastic/442d38c722762c6ea280ace212acf8d5 to your computer and use it in GitHub Desktop.
Save lambdatastic/442d38c722762c6ea280ace212acf8d5 to your computer and use it in GitHub Desktop.
Medium Snippets
import R from 'ramda'
// Object -> Boolean
var FSAcompliant = R.pipe(
R.keys,
R.reject(
R.anyPass([
R.equals('type'),
R.equals('payload'),
R.equals('meta'),
R.equals('error')
])
),
R.length,
R.equals(0)
)
FSAcompliant({test: true}) // false
FSAcompliant({type:'test'}) // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment