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.10
Version published
Weekly downloads
8
100%
Maintainers
1
Weekly downloads
 
Created
Source

oly core

import { env, inject, Kernel } from "oly-core";

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

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

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

// 4. use it
console.log(kernel.get(A).b.c); // D

Installation

$ npm install oly-core

Configuration

ENVProviderDefaultDescription
OLY_APP_NAMELogger"MyApp"The name (or role) of your kernel.
OLY_LOGGER_LEVELLogger"DEBUG"The logging level. TRACE > DEBUG > INFO > WARN > ERROR

Keywords

oly

FAQs

Package last updated on 26 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