subtleGradient / mootools-mvc-transformer
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit 11dae54cb957df8c4886a8570e72aabc498fc59e
tree 13f0f08d9328d67054de1b2b518111f236c4b97b
parent a68155592bf6d47a171d5a3b789dcc04fef54375
tree 13f0f08d9328d67054de1b2b518111f236c4b97b
parent a68155592bf6d47a171d5a3b789dcc04fef54375
| name | age | message | |
|---|---|---|---|
| |
Demos/ | Wed Dec 24 15:29:09 -0800 2008 | |
| |
Docs/ | Wed Dec 24 15:29:09 -0800 2008 | |
| |
LICENSE | Fri Sep 05 19:14:27 -0700 2008 | |
| |
README.md | Wed Dec 24 17:09:23 -0800 2008 | |
| |
Source/ | Wed Dec 24 17:00:32 -0800 2008 | |
| |
Specs/ | Wed Dec 24 17:09:23 -0800 2008 | |
| |
scripts.json | Wed Dec 24 15:29:09 -0800 2008 |
README.md
SubtleTransformer
Huh?
Use this thing if you want to be able to call get and set methods on an object but always be sure to run the value through a function first.
Why would I want to do that?
Imagine you have a SPAN element. You want that element to be money formatted number. You can wrap your variable in a SubtleTransformer.Currency and then every time you do myElement.set('value', 1234.5) it'll run the number through a function that'll format it as currency. Then any time you call myElement.get('value') it'll run the value through another function that'll convert it back to a float!
Imagine the aswome!
