mikehostetler / amplify

AmplifyJS
http://amplifyjs.com
GNU General Public License v2.0
1.45k stars 144 forks source link

More flexible handling of expires option in amplify.store #105

Open SteveTheTechie opened 9 years ago

SteveTheTechie commented 9 years ago

It would be nice to be able to just use {expires: "never"} or a specific date, and let amplify store figure out the details. My proposed changes allow for this via a small function that checks if expires is a string and then does the appropriate conversion to a millisecond offset. I used a function for this to keep the existing code "clean" and allow for other possible keywords for "expires" to be added to the function.