Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

@worldsibu/convector-core-model

Package Overview
Dependencies
5
Maintainers
1
Versions
187
Issues
File Explorer

Advanced tools

@worldsibu/convector-core-model

Convector Model base class

    1.3.8latest
    GitHub

Version published
Maintainers
1
Weekly downloads
346
decreased by-32.55%

Weekly downloads

Readme

Source

Convector Model

This module contains the base model to be used as a base for any other model.

Usage

The children classes can be used in 1 of 3 ways:

As an model query

class MyModel extends ConvectorModel<MyModel> { ... } const model = new MyModel(id); model.fetch() .then(onModelFound) .catch(onModelNotFound);

As a param constructor and validator

class MyModel extends ConvectorModel<MyModel> { /* ... */ } @Controller('my-controller') class MyController { @Invokable() public async myMethod( @Param(MyModel) myModel: MyModel ) { myModel.save(); } }

As a container to start filling the model

class MyModel extends ConvectorModel<MyModel> { /* ... */ } const myModel = new MyModel(); myModel.name = 'name'; myModel.info = 'info'; /* ... */ myModel.save();

Keywords

FAQs

Last updated on 03 Sep 2019

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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