my-hook-library
v1.0.0
Published
Custom hook library
Downloads
1
Readme
README.md
My Hook Library
This is a custom hook library for capturing audit values in Sequelize models.
Installation
Install the package using npm:
Usage
Import the AuditHook
class and apply it to your Sequelize models as needed:
const AuditHook = require('my-hook-library');
const { Model, DataTypes } = require('sequelize');
// Define your Sequelize models and initialize Sequelize...
// Apply the AuditHook to a model
const auditHook = new AuditHook({ logFile: 'audit.log' });
auditHook.apply(User);
// Continue with your application code...