Closed br0r closed 9 years ago
Sometimes you'll accept more than one type as argument. There needs to be a .oneOf method to accept it. It should extend the any object of some so it'll be able to chain format on it.
any
Duns('5').schema(Duns.oneOf([Duns.string(), Duns.number()]).format((num) => +num)).validate().format();
+1 - feels rather important. 0.1?
Sometimes you'll accept more than one type as argument. There needs to be a .oneOf method to accept it. It should extend the
any
object of some so it'll be able to chain format on it.