sequelize-orderby-parser
v1.0.1
Published
convert your string to acceptable format of orderBy in sequelize.
Downloads
2
Maintainers
Readme
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' ] ]