Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cookie-control

aaron-ecce415MIT0.1.1

Contains proxy object for document.cookie to allow filtering

proxy, document, cookie, cookies, js-cookie, browserify

readme

Cookie Proxy

A Proxy for document.cookie to control which cookies are allowed to be created with a filter.

Installation

npm install cookie-control --save

Usage

<script src="dist/cookieproxy.min.js"></script>
<script>
  CookieProxy.setFilter(function(cookie) {
      return true; // Returning false will prevent the cookie from being set
  });
</script>

Make sure to include this script as early as possible to prevent other scripts from setting cookies before the proxy has been applied.

License

MIT