1.0.6 • Published 1 year ago

success-failed-message v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

To install the package

npm i --save success-failed-message

Usage

const reply = require("success-failed-message")

reply.failed(res, "Something went wrong. Try again!");

reply.success(res, "Data fetched successfully");

The Failed parameters


Parameters  |       Type              |           Description

res         |     Function            |   Function Response form the express
message     |     string, text        |   Any type of message (must be text or string)

The Success parameters


Parameters  |       Type              |          Default                |           Description

res         |     Function            |            N/A                  |   Function Response form the express
message     |     string, text        |            N/A                  |   Any type of message (must be text or string)
data        |     Array, object       |            null                 |   Send the data from user end
pagination  |     Boolean             |            false                |   For dynamic pagination value send to the frontend (default: 20)
title       |     string, text        |            ""                   |   Title for the success message
extra       |     Array               |            []                   |   Extra is an array with the key or values you want to send

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago