New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

z-container

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

z-container

A container to save and retreive data / object references, etc.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

z-container

Build Status npm version

This is a container solution to save and later retrieve object references, and other data.

Since it's a CommonJS module, it must be used alongside with Browserify, or something similar, like WebPacker.

Example, explanation

var container = require('z-container');

container.add('some_object_reference', object_reference);

container.has('some_object_reference');
// -> true, only if the key really exists in the container

// Returns the previously saved reference.
// This is useful, when CommonJS modules compiled to the web need to access a
// certain module which was instantiated by the `new` operator.
container.get('some_object_reference');

// The container can save and retrieve other kinds of data too, which is useful
// when you have to pass data at runtime, and cannot simply `require()` data
// from a file.
container.add('some_string', 'string');
container.get('some_string'); // returns "string"

License

MIT

Keywords

FAQs

Package last updated on 12 Jun 2015

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