Usage/Examples
use "-" prefix for DESC order.
const sequelizeParser = require("sequelize-order-parser");
sequelizeParser("-created_at,amount,-rate")
output
[ [ 'created_at', 'DESC' ],[ 'amount', 'ASC' ],[ 'rate', 'DESC' ] ]
use "-" prefix for DESC order.
const sequelizeParser = require("sequelize-order-parser");
sequelizeParser("-created_at,amount,-rate")
output
[ [ 'created_at', 'DESC' ],[ 'amount', 'ASC' ],[ 'rate', 'DESC' ] ]
npm i sequelize-orderby-parser
0
1.0.1
ISC
1.13 kB
3