Socket
Socket
Sign inDemoInstall

platos-model

Package Overview
Dependencies
14
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

0.8.0

Diff

Changelog

Source

0.8.0

  • Replaced the hook library which has enhanced functionality slightly.
  • Changed the inheritance model from util.inherits to Model.inherits().
  • New in-built utility functions for sanitising a document upon storage.
dnjohnson
published 0.7.0 •

Changelog

Source

0.7.0

  • Added Model.insert() support for bulk-inserting of documents into a collection.
  • Added Model.drop() support for completely removing collections.
dnjohnson
published 0.6.1 •

Changelog

Source

0.6.1

  • Fixed an inheritance issue when used with cursors.
dnjohnson
published 0.6.0 •

Changelog

Source

0.6.0

  • All methods that pull instances from the database will call model.retrieve() on each instance.
  • Inheritance support via util.inherits() - can save multiple child models to a single collection for polymorphism-like retrieval.
dnjohnson
published 0.5.1 •

Changelog

Source

0.5.1

  • Fixed a couple bugs when not supplying callbacks to certain methods.
  • Enabled support for all cursor functions - limit(), skip(), etc.
dnjohnson
published 0.5.0 •

Changelog

Source

0.5.0

  • save() can now accept an object to save to the database without changing the instance.
  • find() now returns a mock cursor that will allow chaining: model.find().sort().
dnjohnson
published 0.4.0 •

Changelog

Source

0.4.0

  • A few bug fixes.
  • Now exposes any created Model via the global platos-model package.
  • New built-in prototypal inheritance pattern.
dnjohnson
published 0.3.0 •

Changelog

Source

0.3.0

  • Added update() support via static or instance methods.
dnjohnson
published 0.2.0 •

Changelog

Source

0.2.0

  • Multi-tenancy support added for find(), save() and remove().
  • find() now returns instances of Model instead of Objects.
dnjohnson
published 0.1.0 •

Changelog

Source

0.1.0

  • Ability to create and instantiate Models.
  • Ability to find(), save() or remove() model instances to MongoDB.
  • Ability to add pre() or post() hooks to static methods belonging to Model.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc