@cimo/pid
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Pid

PID management. Light, fast and secure. Write with native Typescript code and no dependencies is used.

Publish

  1. npm run build
  2. npm login --auth-type=legacy
  3. npm publish --auth-type=legacy --access public

Installation

  1. Link for npm package -> https://www.npmjs.com/package/@cimo/pid

Server - Example with "NodeJs Express"

  • Server.ts
...

import { Cp } from "@cimo/pid";

// Source
import * as ControllerTest from "../controller/Test";

...

const cp = new Cp();

ControllerTest.execute(cp);

...
  • ControllerTest.ts
...

import { Cp } from "@cimo/cp";

...

export const execute = (cp: Cp) => {
    cp.add("api", "", 0, (isExists, pidKey) => {
        if (!isExists) {
            cp.update(pidKey, "");

            ...

            cp.remove(pidKey);

            // Action completed.
        } else {
            // Another action still running.
        }
    });
};

...

/@cimo/pid/

    Package Sidebar

    Install

    npm i @cimo/pid

    Weekly Downloads

    8

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.78 kB

    Total Files

    12

    Last publish

    Collaborators

    • cimo