1.1.4 • Published 6 months ago

mongoose-collection-naming-plugin v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

CI release

Description

A Mongoose plugin that enforces a standard naming convention (e.g., CamelCase, SnakeCase) for collections while allowing flexibility for custom names outside the convention.

Installation

npm

npm i mongoose-collection-naming-plugin

pnpm

pnpm add mongoose-collection-naming-plugin

Usage

Typescript

import {
  MongooseCollectionNamingPlugin,
} from 'mongoose-collection-naming-plugin';

// It uses NamingConvention.CamelCase by default
mongoose.plugin(MongooseCollectionNamingPlugin);

Javascript

const {
  MongooseCollectionNamingPlugin,
  NamingConvention,
} = require('mongoose-collection-naming-plugin');

mongoose.plugin(
  MongooseCollectionNamingPlugin, 
  { namingConvention: NamingConvention.SnakeCase }
);
1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago