JSBizon / file-cookie-store

Store cookies in Netscape file format for tough-cookie library
MIT License
8 stars 9 forks source link

Add allowSpecialUseDomain - tough-cookie 4.0.0 support #4

Open msikma opened 3 years ago

msikma commented 3 years ago

Apparently tough-cookie changed the way the findCookies method works slightly. It now allows allowSpecialUseDomain to be passed, which messes up file-cookie-store when you try to use it since it expects the third argument to be a callback function, causing it to throw an error on any use.

I've actually just copied this new code from tough-cookie's own memstore.js file. I don't know if this robustly adds tough-cookie 4.0.0 support since I haven't tested it, but I hope it's a start at least.