UNPKG

proof-of-possession-cookie-info

Version:

Exposes the native `GetCookieInfoForUri(..)` function from the ProofOfPossessionCookieInfo.h to JavaScript via N-API

13 lines (11 loc) 331 B
const os = require('os'); function notWindowsSoDoNothing(url) { return ""; } if (os.type() === 'Windows_NT') { const cookieInfoManager = require('bindings')('cookie-info-manager'); exports.getCookieInfoForUri = cookieInfoManager.getCookieInfoForUri; } else { exports.getCookieInfoForUri = notWindowsSoDoNothing; }