@jswork/next-data-transform

    1.0.4 • Public • Published

    next-data-transform

    Data transform for next.

    version license size download

    installation

    npm install -S @jswork/next-data-transform

    apis

    api params description
    raw data Do nothing
    json data application/json;charset=utf-8
    urlencoded data application/x-www-form-urlencoded
    multipart data multipart/form-data

    usage

    import NxDataTransform from '@jswork/next-data-transform';
    
    const data = { key: 1, value: 2 };
    
    NxDataTransform.raw(data);          // { key: 1, value: 2 };
    NxDataTransform.json(data);         // '{"key":1,"value":2}'
    NxDataTransform.urlencoded(data);   // key=1&value=2
    NxDataTransform.multipart(data);    // `[object FormData]`

    license

    Code released under the MIT license.

    Install

    npm i @jswork/next-data-transform

    DownloadsWeekly Downloads

    54

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    6 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar