import { createEntry } from "./entry" ; import { createExtant } from "./extant" ; export const createValidation = ctx => msg => function validation ( predicate ) { if ( typeof predicate === "string" ) { const newPredicate = createExtant ( ctx ) ; return createEntry ( ctx ) ( predicate , a => newPredicate ( a , msg ) ) ; } return ( ... args ) => { return predicate ( ... args , msg ) ; } ; } ;