How to use the sequelize-slugify.slugifyModel function in sequelize-slugify

To help you get started, we’ve selected a few sequelize-slugify 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 Vheissu / aurelia-graphql-apollo / server / database / models / post.js View on Github external
allowNull: false
        },
        status: DataTypes.STRING,
        type: DataTypes.STRING,
        commentsEnabled: DataTypes.BOOLEAN
    },
        {
            freezeTableName: true,
        }
    );

    Post.associate = (models) => {
        Post.belongsTo(models.user);
    };

    SequelizeSlugify.slugifyModel(Post, {
        source: ['title']
    });

    return Post;
};

sequelize-slugify

Add slugs to sequelize models

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular sequelize-slugify functions