jonschlinkert / repeat-string

Repeat the given string n times. Fastest implementation for repeating a string (2x faster than the native method)
https://github.com/jonschlinkert
MIT License
49 stars 17 forks source link

Improper argument bug correction #8

Open ggattoni opened 6 years ago

ggattoni commented 6 years ago

Corrected a bug in input parameter

When calling the function there was no check the number parameter being really a number. This bug fix use an appropriated ad hoc function to check that to reduce improper behaviour and NaN propagation.