Closed Sadeka closed 7 years ago
Actually, @Sadeka , I think there is a better way to accomplish this. Instead of special-casing all non Primitive Objects, we should just change the check to see if the .constructor
is Object
. Keep all of the tests you wrote, but would you remove the special case for Date
and change L#150 to:
} else if (angular.isObject(value) && value.constructor === Object) {
That will fail for Blob
s and Date
s and moment
s and anything else that uses a special constructor.
Let me know if that makes sense or if you see a logical flaw in that!
Thanks @scotttrinh for your valuable feedback. I have updated the code accordingly. Submitting a new pull request with a fresh single commit.
Hello,
I have updated the code to add support for getting/setting a Date object (works for IndexedDB). I have also added a unit test for for it. Could you please review my changes?
Thanks & Regards, Sadeka