cpuabuse-system
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

Travis (.com) npm Codecov Codacy grade Libraries.io dependency status for latest release Documentation Chat

About

Related projects

Description

The system handles initialization of data structures using information from yaml files. System is split into multiple extendable modular subsystems, responsible for respective functionality such as file system, error handling, internal system logic, etc.

Setup

Requirements

  • Node.js version 10 and higher

Dependencies

Installation

npm install cpuabuse-system --save

API

TypeScript

// Import
import { Behaviors, ErrorCallback, Options, System } from "cpuabuse-system";
 
// Init options
let options: Options = {
    id: "my_system",
    initFilename: "init",
    logging: "off",
    relativeInitDir: "my_system",
    rootDir: "root"
};
 
// Init behaviors
let behaviors: Behaviors = [
    {
        system_load() {
            console.log("done");
        }
    }
];
 
// Create a system
let mySystem: System = new System({ options, behaviors, onError });

Node.js

// Import
const system = require("cpuabuse-system");
 
// Init options
let options = {
    id: "my_system",
    initFilename: "init",
    logging: "off",
    relativeInitDir: "my_system",
    rootDir: "root"
};
 
// Init behaviors
let behaviors = [
    {
        system_load() {
            console.log("done");
        }
    }
];
 
// Create a system
let mySystem = new system.System({ options, behaviors, onError });

Readme

Keywords

none

Package Sidebar

Install

npm i cpuabuse-system

Weekly Downloads

1

Version

0.6.0

License

UNLICENSED

Unpacked Size

170 kB

Total Files

113

Last publish

Collaborators

  • badelgatobot
  • winterhotlatte
  • yanocv
  • elgatobot