Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@foxify/odin

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foxify/odin

Active Record Model

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
60
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

Odin

Odin is an implementation of Active Record pattern in TypeScript.

NPM Version Node Version TypeScript Version Tested With Jest Pull Requests License Build Status Coverage Status Package Quality Dependencies Status NPM Total Downloads NPM Monthly Downloads Open Issues Closed Issues known vulnerabilities Github Stars Github Forks

Table of Content

Installation

Before installing, download and install Node.js. Node.js 8 or higher is required.

npm i -s @foxify/odin

Usage

const Odin = require("@foxify/odin");

const { Types } = Odin;

class User extends Odin {
}

User.schema = {
  email: Types.String.email.required,
  name: {
    first: Types.String.min(3).required,
    last: Types.String.min(3),
  }
};

Features

  1. Cross DB
  2. Written in ES6
  3. TypeScript ready
  4. Active Record pattern
  5. Schema validation
  6. GraphQL Schema generator (based on model schema)

TODO (RoadMap to version 1.0.0)

  • Schema validation
  • Drivers
    • MongoDB
    • MySQL
    • MariaDB
    • PostgreSQL
    • SQLite
    • Redis
    • Memory
  • Model hooks
    • created
    • updated
    • deleted
    • restored
  • Relationships
    • embedMany
    • hasMany
    • hasOne
    • hasManyThrough
    • hasOneThrough
    • Polymorphic
      • morphMany
      • morphOne
      • morphTo
      • morphManyThrough
      • morphOneThrough
      • morphToThrough
    • CRUD operations
      • Create operation
      • Read operation
      • Update operation
      • Delete operation
  • GraphQL support
  • Migrations
  • Seeding
  • Tests

Support

If my work helps you, please consider

Buy Me A Coffee Become A Patron

Keywords

FAQs

Package last updated on 16 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc