disnet/contracts.js — Issue #2: clean_rng.check is not a function
Author: gregwebs
Created: 2012-02-26 00:42:13+00:00
State: open

```
clean_rng.check is not a function
functionHandler()

contracts.js (line 742)
res = clean_rng.check(f.apply(thisc, args), pos, neg, parents, stack);
```

This comes from my cssNum contract:

``` coffee
cssNum :: (Num) -> String
cssNum = (n) -> roundNumber(n,1).toString()

roundNumber :: (Num, Num or Undefined) -> Num
roundNumber = (number, digits) ->
multiple = Math.pow(10, digits || 0)
Math.round(number * multiple) / multiple
```