Socket
Socket
Sign inDemoInstall

@ogre-tools/injectable-extension-for-auto-registration

Package Overview
Dependencies
3
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ogre-tools/injectable-extension-for-auto-registration

Auto-registration of injectables for Injectable in Ogre Tools


Version published
Weekly downloads
646
decreased by-2.42%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

15.2.1 (2023-03-31)

Bug Fixes

  • Change the typing of injectionDecoratorToken (e0b8871)

Readme

Source

Auto-registration for Injectable in Ogre Tools

Auto register injectables from default exports of files that match a require.context.

Usage

$ npm install @ogre-tools/injectable
$ npm install @ogre-tools/injectable-extension-for-auto-registration

...
  const di = createContainer();
  
  autoRegister({ 
    di, 
    
    requireContexts: [
      require.context("./some-directory", true, /\.injectable\.(ts|tsx)$/),
      require.context("./some-other-directory", true, /\.injectable\.(ts|tsx)$/),
    ],
  });

Documentation

Check unit tests for documentation.

Keywords

FAQs

Last updated on 31 Mar 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc