Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@krakenjs/cross-domain-safe-weakmap

Package Overview
Dependencies
Maintainers
9
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@krakenjs/cross-domain-safe-weakmap

Cross domain safe WeakMap.

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

Cross Domain Safe WeakMap

build status code coverage npm version apache license

WeakMap shim that works with cross-domain windows. Uses native WeakMap when available.

Installation

As of version 2 this package will be published under the @krakenjs scope.

npm install @krakenjs/cross-domain-safe-weakmap

Rationale

Storing references to window objects is memory-expensive, even after those window objects have closed.

Existing WeakMap shims hang an object of the WeakMap key. This poses a problem when dealing with cross-domain windows, where setting or getting any key other than a pre-defined set of readonly values, will throw a cross-origin error.

Keywords

FAQs

Package last updated on 09 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc