How to use the ormnomnom.describeConflict function in ormnomnom

To help you get started, we’ve selected a few ormnomnom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github entropic-dev / entropic / services / storage / models / user.js View on Github external
'use strict';

const iron = require('@hapi/iron');
const orm = require('ormnomnom');
const joi = require('@hapi/joi');

orm.describeConflict('users_name_idx', 'Usernames must be unique.');

module.exports = class User {
  constructor({
    id,
    name,
    email,
    tfa_secret,
    backup_codes,
    tfa_active,
    created,
    modified,
    active
  }) {
    this.id = id;
    this.name = name;
    this.email = email;

ormnomnom

a lightweight orm to silence the orm-y beast

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis