Socket
Book a DemoInstallSign in
Socket

oly-core

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oly-core

Delicate Sound of Thunder

Source
npmnpm
Version
0.8.5
Version published
Weekly downloads
10
150%
Maintainers
1
Weekly downloads
 
Created
Source

oly core

import { env, inject, Kernel } from 'oly';

class B {
  // 1. set configuration
  @env('C') c;
}

class A {
  // 2. inject dependency
  @inject() b: B;
}

// 3. create the container
const conf = {'C': 'D'};
const kernel = new Kernel(conf);

// 4. create your dependency
console.log(kernel.get(A).b.c); // D

Installation

$ npm install oly-core

Configuration

ENVProviderDefaultDescription
OLY_APP_NAMELoggerMyAppThe name (or role) of your kernel.
OLY_LOGGER_LEVELLoggerDEBUGThe logging level. TRACE > DEBUG > INFO > WARN > ERROR

FAQs

Package last updated on 16 Apr 2017

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