Last active
October 25, 2016 20:17
-
-
Save lambdatastic/442d38c722762c6ea280ace212acf8d5 to your computer and use it in GitHub Desktop.
Medium Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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