open-index/open-npm huggingface dataset:
npm package: @mildjs/di
Description: A Lightweight Dependency Injection container for Javascript/Typescript. 
Author: Thada Wangthammang
Latest version: 2.0.2

# @MildJS/di

[![Build Status](https://travis-ci.org/mildjs/di.svg?branch=main)](https://travis-ci.org/mildjs/di) 
[![codecov](https://codecov.io/gh/mildjs/di/branch/main/graph/badge.svg?token=6wlUe1OgBT)](https://codecov.io/gh/mildjs/di)
[![npm version](https://badge.fury.io/js/%40mildjs%2Fdi.svg)](https://badge.fury.io/js/%40mildjs%2Fdi)

A Lightweight Dependency Injection container for Javascript/Typescript. 

## Features

- Support `value`, `Class`, `Factory` and `AsyncFactory`

## Installation

```
$ npm install @mildjs/di reflect-metadata 
```

## Usage 

```typescript
import "reflect-metadata";
import { Injectable, ReflectiveInjector, Inject } from '../../../src';

@Injectable()
export class InjectableClass {
    constructor(@Inject('mock_token') public api: string) { }

}

const asyncFunc = () => new Promise(resolve =>
    setTimeout(() => { resolve("Hello async") }, 100)
);

const injector = ReflectiveInjector.init([
    InjectableClass,
    {
        provide: "mock_token",
        useAsyncFactory: asyncFunc()
    },
]);


async function main() {
    const instance = await injector.get(InjectableClass)
    console.log(instance.api);
}

main();
```

output

```
Hello async
```

Original by https://dev.to/darcyrayner/typescript-dependency-injection-in-200-loc-12j7
npm package: @mildjs/typeorm
Description: TypeORM module (extension) for @mildjs/core
Author: Thada Wangthammang
Latest version: 1.0.1

# TypeORM module (extension) for @mildjs/core

[![Build Status](https://travis-ci.org/mildjs/typeorm.svg?branch=main)](https://travis-ci.org/mildjs/typeorm)
[![codecov](https://codecov.io/gh/mildjs/typeorm/branch/main/graph/badge.svg?token=tk4rLlUNBP)](https://codecov.io/gh/mildjs/typeorm)
[![npm version](https://badge.fury.io/js/%40mildjs%2Ftypeorm.svg)](https://badge.fury.io/js/%40mildjs%2Ftypeorm)


## Features

- Auto load Entity 
- Support TypeOrm connection using `@InjectConnection`
- Support TypeOrm repository using `@InjectRepository`

## Installation

```
$ npm install @mildjs/typeom typeorm 
```

### Usage

1. Define user entity

    ```typescript
    // filename: user.entity.ts
    import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

    @Entity()
    export class UserEntity {
        @PrimaryGeneratedColumn()
        id: number;

        @Column()
        name: string;

    }
    ```

2. define controller

    ```typescript
    // filename: user.controller.ts
    import { Connection, Repository } from 'typeorm';
    import { Controller } from '@mildjs/core';
    import { InjectConnection, InjectRepository } from '@mildjs/typeorm';
    import { UserEntity } from './users.entity';

    @Controller('users')
    export class UsersController {

        constructor(
            @InjectConnection()
            private connection: Connection,

            @InjectRepository(UserEntity)
            private repository: Repository<UserEntity>
        ) {
            this.testConnection();
        }

        async testConnection() {
            if(this.connection instanceof Connection){
            console.log('Database connected')
            }
            const newUser = new UserEntity();
            newUser.name = "foobar";
            const user: UserEntity = await this.repository.save(newUser);
            console.log(user);
        }

    }
    ```

3. Setup `@mildjs/core` with express 

    ```typescript
    // filename:  main.ts
    import 'reflect-metadata';
    import express from 'express';
    import { useExpressServer } from '@mildjs/core';
    import { TypeOrmModule } from '@mildjs/typeorm';
    import { UsersController } from './users/users.controller';
    import { UserEntity } from './users/users.entity';

    const app = express();

    async function main() {
        await useExpressServer(app, {
            controllers: [UsersController],
            imports: [
                TypeOrmModule.forRoot({
                    name: 'default',
                    type: 'sqlite',
                    database: './app.sqlite',
                    synchronize: true,
                    entities: [UserEntity],
                })
            ],
        });
    }

    main();
    app.listen(3001);
    console.log("server listening at port 3001")
    ```

Run

```
ts-node ./main.ts
```

The result should be (the ID is auto generated )

```bash
server listening at port 3001
Database connected
UserEntity { name: 'foobar', id: 1 }
```
npm package: @mildronize/azure-functions
Description: Azure Function Nodejs Lightweight frameworks with Dependency Injection
Author: Thada Wangthammang
Latest version: 0.0.1-pre-alpha.6
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @mildronize/azure-functions
Azure Function Nodejs Lightweight frameworks with Dependency Injection

This package is already rename to [Nammatham](https://www.npmjs.com/package/nammatham), please use it instead

> This project is in proof of concept stage, any issue feel free to open the issue.

## Features
- Support Azure Functions HTTP trigger

## Motivation

.NET is a first-class supported in Azure Function which 

it will autogenerate, 2 files per function

1. function.json
  ```json
  {
    "bindings": [
      {
        "authLevel": "anonymous",
        "type": "httpTrigger",
        "direction": "in",
        "name": "req",
        "methods": [
          "get"
        ]
      },
      {
        "type": "http",
        "direction": "out",
        "name": "res"
      }
    ],
    "scriptFile": "../dist/src/controllers/user.controller.js"
  }
  ```

2. index.ts
  ```ts
  import 'reflect-metadata';
  import { AzureFunction, Context } from '@azure/functions';
  import { funcBootstrap } from '@mildronize/azure-functions';
  import { UserController } from '../src/controllers/user.controller';

  const GetUsers: AzureFunction = async function (
  context: Context,
  ...args: any[]
  ): Promise<void> {
  funcBootstrap({
    classTarget: UserController,
    methodName: 'getUsers',
    azureFunctionParams: [context, ...args]
  });
  };

  export default GetUsers;
  ```

## Usage
Please see in [example](examples) directory

## TODO
- [ ] Add Log at boostrap level
- [ ] Inject **Context** in Class Dependency

## Author
- Thada Wangthammang, Software Engineer, Thailand
npm package: @mileeyu/npm_test
Description: Cocobits is a responsive CSS foundational system to build elegant web applications.
Author: Milee Yu
Latest version: 7.0.0

# npm test

![npm (scoped)](https://img.shields.io/npm/v/@mileeyu/npm_test)

## Quick Start

```HTML
<link rel="stylesheet" href="https://unpkg.com/@mileeyu/npm_test/css/test.min.css">
```