typs.js
// checks if obj is one element of domain
checks if obj is one element of domain
checks if obj is one element of domain
oneOf (domain) {
		if (typs(domain).hasLength().doesntCheck()) {
			throw new Error('typs().oneOf() expects an iterable collection as its first parameter');
		}
		return this.add((obj) => {
			if (typeof obj === 'undefined') return false;
			return -1 !== domain.indexOf(obj);
		});
	}
oneOf ( domain ) { if ( typs ( domain ) . hasLength ( ) . doesntCheck ( ) ) { throw new Error ( 'typs().oneOf() expects an iterable collection as its first parameter' ) ; } return this . add ( ( obj ) => { if ( typeof obj === 'undefined' ) return false ; return - 1 !== domain . indexOf ( obj ) ; } ) ; }
checks if obj is one element of domain
checks if obj is one element of domain