@lskjs/db

LSK.js module for working with mongodb database

Usage no npm install needed!

<script type="module">
  import lskjsDb from 'https://cdn.skypack.dev/@lskjs/db';
</script>

README

LSK.js – db

@lskjs/db – LSK.js module for working with mongodb database

LSK logo NPM version NPM downloads NPM Dependency count Have TypeScript types Have tree shaking NPM Package size Package size Ask us in Telegram


Table of contents

⌨️ Install

# yarn
yarn i @lskjs/db @types/mongoose bluebird lodash

# npm
npm i @lskjs/db @types/mongoose bluebird lodash

основная фишка - UniversalSchema

Example of exntend

import BotsTelegramMessageModel from '@lskjs/bots/models/BotsTelegramMessageModel'

export default (...args) => {
  const Schema = BotsTelegramMessageModel(...args);
  Schema.extend({
    status: {
      type: String,
    }
  });
  return Schema;
};


export default (...args) => {
  const Schema = BotsTelegramMessageModel(...args);
  Schema.schema = {
    ...Schema.schema,
    status: {
      type: String,
    }
  }
  return Schema;
};

📖 License

This project is licensed under the MIT License - see the LICENSE file for details

👥 Contributors


Igor Suvorov

💻 🎨 🤔

👏 Contributing

  1. Fork it (https://github.com/yourname/yourproject/fork)
  2. Create your feature branch (git checkout -b features/fooBar)
  3. Commit your changes (git commit -am 'feat(image): Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

📮 Any questions? Always welcome :)