Skip to content

Instantly share code, notes, and snippets.

@hughfdjackson
Created March 12, 2013 00:29
Show Gist options
  • Select an option

  • Save hughfdjackson/5139263 to your computer and use it in GitHub Desktop.

Select an option

Save hughfdjackson/5139263 to your computer and use it in GitHub Desktop.
$ flesh-out require('my-module').toNumber
provide type signature for inputs
> Int
What do you expect for: NaN?
> NaN
What do you expect for: Infinity?
> Infinity
What do you expect for: '34'?
> 34
results:
NaN -> error thrown
Infinity -> Infinity
'34' -> 34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment