bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.08k stars 438 forks source link

Store the original input in the tinycolor object #65

Closed le717 closed 10 years ago

le717 commented 10 years ago

For #63. Just as we talked about. I also added a getter method for the property. How do the names sound to you?

bgrins commented 10 years ago

@le717 thanks! I'd say go with getOriginalInput to match the private _originalInput name (and I think it's better than going with getInput/_input just because it's a bit more descriptive).

Would you mind updating test.js to add a few cases for this function, like strings with various casing, object input, and invalid (null, empty string). You can add it right after the "TinyColor initialization" test.

le717 commented 10 years ago

@bgrins Changes pushed, hopefully everything looks good. I'll leave the version increase to you if you want (I make it a rule not to increase it unless asked to).

bgrins commented 10 years ago

@le717 landed, thanks. I also pushed 1.1.0 including this change