import { Arbitrary } from '../../arbitrary' ; import { object , oneOf , constant } from '../../combinators' ; import { date } from '../primitive/datetime' ; import { Definitions } from '../../definition' ; import defsdata from './definitions/index' ; const defs = new Definitions ( defsdata ) ; example const firstName = defs . arbitrary ( 'firstName' ) . set ( 'name' , 'First Name' ) ; example const lastName = defs . arbitrary ( 'lastName' ) . set ( 'name' , 'Last Name' ) ; example const name = object ( { firstName : firstName , lastName : lastName } ) . transform ( defs . formatter ( 'name' ) ) . set ( 'name' , 'Name' ) ; example const gender = defs . arbitrary ( 'gender' ) . set ( 'name' , 'Gender' ) ; example export const person = object ( { name : name , gender : gender , birthDay : date } ) . set ( 'name' , 'Person' ) . assign ( { name , firstName , lastName , gender } ) ;