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

dein

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dein

A small dependency injection framework for node.js.

  • 4.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
decreased by-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

dein - dependency injection framework

A small dependency injection framework for node.js.

  • Register modules with dependencies.
  • Register literals without dependencies.
  • Dependency injection framework is immutable.

Features

  • dein is lazy. Only dependencies which are used are resolved
  • dein allows async dependency resolution by using promises. You can mix synchronous factory methods with asynchronous ones.
  • dein will automatically find the required dependency. No need to define the order of dependencies.

Quick Start

npm install dein
const dein = require('dein');

Examples

dein
  .registerLiteral('someString', 'Hello World')
  .register('someModule', someString => `${someString}!!!`)
  .resolve('someModule')
  .then((result) => {
    console.log('Result: ' + result);
    // Expected: `Result: Hello World!!!
  });

Tests

npm test

FAQs

Package last updated on 21 Jun 2019

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