Closed sonnyp closed 10 years ago
Spec: http://tools.ietf.org/html/rfc6902#section-4.6
Implementation:
test: function (obj, key) { return(JSON.stringify(obj[key]) === JSON.stringify(this.value)); },
It doesn't work if 2 arrays/objects are equals (from the RFC definition) but ordered differently.
JSON.stringify(['foo', 'bar']) === JSON.stringify(['bar', 'foo']); //false
Nice find. Will fix.
@jmeas actually I'm almost done, I'll send a PR
Awesome!
Merged, released in version 0.3.10. Thanks for your contribution @sonnyp!
Spec: http://tools.ietf.org/html/rfc6902#section-4.6
Implementation:
It doesn't work if 2 arrays/objects are equals (from the RFC definition) but ordered differently.