stagify
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

stagify

Hey, there! Here is an open-source library for converting endpoint query string to MongoDB query working together with mongoose and express.js.

stagify

// input
{
    name: "sambath",
    sort: {
        createdAt: -1
    }
}
// output
[
    {
        '$match': { name: 'sambath' }
    },
    {
        '$sort': { createdAt: -1 }
    }
]

querify

// input
{
    name: "sambath",
    sort: {
        createdAt: -1
    }
}
// output
{
    filters: { name: 'sambath' },
    select: {},
    options: {
        skip: 0,
        limit: 25,
        sort: { createdAt: -1 }
    }
}

/stagify/

    Package Sidebar

    Install

    npm i stagify

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    24.8 kB

    Total Files

    42

    Last publish

    Collaborators

    • banlytong