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.
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.