open-index/open-npm huggingface dataset:
npm package: @libs-for-dev/nestjs-config-module
Description: NestJS config module with config validation
Author: libs-for-dev
Latest version: 2.2.0

# NestJS Config module

It is config module with validation values in runtime.
It does not allow to run application with invalid configuration.
Use `class-validator` validators before apply in application.

## Installation
```bash
yarn add @libs-for-dev/nestjs-config-module
```

## Usage

### Prepare config and config validator
1. create config validator class
```typescript
import { Expose } from 'class-transformer'
import { IsNumber, IsString } from 'class-validator'

export class ExampleConfigValidator {
  @IsNumber()
  @Expose()
  public keyNumber!: number
}
```

2. create config class
```typescript
import { Inject, Injectable } from '@nestjs/common'
import { ExampleConfigValidator } from './example-config.validator'

@Injectable()
export class ExampleConfig {
  public constructor(@Inject(ExampleConfigValidator) private readonly validator: ExampleConfigValidator) {}

  public getKeyNumber(): number {
    return this.validator.keyNumber
  }
}
```

### Use with valid config

1. init module with validation config. Provide raw config from `process.env`
```typescript
import { ExampleConfigValidator } from './example-config'
import { ExampleConfig } from './example-config.validator'

const config = { keyNumber: 1 }

@Module({
  imports: [
    ConfigsModule.forFeature([ExampleConfig], config, [ExampleConfigValidator]),
  ]
})
export class ExampleModule {}
```

2. run application and get validated config
```typescript
const app = await NestFactory.create(ExampleModule)

console.log(app.get(ExampleConfig).getKeyNumber())
// 1
```

### Use with invalid config

1. init module with validation config. Provide raw config from `process.env`
```typescript
import { ExampleConfigValidator } from './example-config'
import { ExampleConfig } from './example-config.validator'

// no expected in ExampleConfigValidator key
// const config = { }
// or wrong excepced for validation value
const config = { keyNumber: "not a number" }

@Module({
  imports: [
    ConfigsModule.forFeature([ExampleConfig], config, [ExampleConfigValidator]),
  ]
})
export class ExampleModule {}
```

2. run application and get validated config
```typescript
const app = await NestFactory.create(ExampleModule)
// throws error before run application
```

## Usage with env variables
```typescript
import * as process from 'process'
import { ExampleConfigValidator } from './example-config'
import { ExampleConfig } from './example-config.validator'

@Module({
  imports: [
    ConfigsModule.forFeature(
      [ExampleConfig],
      process.env,
      [ExampleConfigValidator]
    ),
  ]
})
export class ExampleModule {}
```
npm package: @libs-for-dev/nestjs-typeorm-logger
Description: NestJS TypeORM logger
Author: libs-for-dev
Latest version: 1.4.0

# NestJS TypeORM logger implementation

## Installation
```bash
yarn add @libs-for-dev/nestjs-typeorm-logger
```

## Usage

```typescript
import { TypeormLogger } from '@libs-for-dev/nestjs-typeorm-logger'

@Module({
  imports: [
    TypeOrmModule.forRootAsync({
      inject: [PinoLogger],
      useFactory: (logger: PinoLogger): TypeOrmModuleOptions => {
        return {
          logger: new TypeormLogger(logger),
          // other TypeORM options
        }
      },
    }),
  ]
})
export class ExampleModule {}
```
npm package: @libs-for-dev/typeorm-plural-naming-strategy
Description: TypeORM plural naming strategy
Author: libs-for-dev
Latest version: 1.4.0

# TypeORM plural naming strategy

## Installation
```bash
yarn add @libs-for-dev/typeorm-plural-naming-strategy
```

## Usage

```typescript
import { TypeormPluralNamingStrategy } from '@libs-for-dev/typeorm-plural-naming-strategy'

const typeormConfig: DataSourceOptions =  {
  // other TypeORM options
  namingStrategy: new TypeormPluralNamingStrategy(),
}
```
npm package: @libs-jd/xlsx-parse-table
Description: Modern Excel/XLSX parser and streaming capabilities
Author: Jeet Dhandha
Latest version: 1.0.13

Visit the documentation at [Github Readme](https://github.com/jeet-dhandha/xlsx-parse-table/blob/master/README.md)
## Demo
Link to [Demo](https://xlsx-parse-table-demo.vercel.app/), where you can upload an Excel file and see the parsed tables.