import * as Benchmark from 'benchmark' ; import * as F from '../src/' ; import * as R from 'ramda' ; import { eqString } from 'fp-ts/lib/Eq' ; const suite = new Benchmark . Suite ( ) ; const endsWith = F . endsWith ( eqString ) ; suite . add ( 'endsWith (ramda)' , function ( ) { R . endsWith ( [ 'c' ] ) ( [ 'a' , 'b' , 'c' ] ) ; } ) . add ( 'endsWith (fp-ts)' , function ( ) { endsWith ( [ 'c' ] ) ( [ 'a' , 'b' , 'c' ] ) ; } ) . on ( 'cycle' , function ( event ) { console . log ( String ( event . target ) ) ; } ) . on ( 'complete' , function ( this ) { console . log ( 'Fastest is ' + this . filter ( 'fastest' ) . map ( 'name' ) ) ; } ) . run ( { async : true } ) ;