4
debug
8y

CamanJS is a nice library and such but why does it's vignette function take a String as it's parameter for percentage!? It parses it by removing the '%' character and doing a parseInt()!

Comments
  • 1
    Probably so you can pass 100, "100" or "100%". And it will work.
  • 0
    @dotomaz won't work.
    ```
    if (typeof size === "string" && size.substr(-1) === "%") {
    //some code here
    }
    ```
Add Comment