Wondering what’s next for npm?Check out our public roadmap! »

    utf8-deep-converter

    0.1.3 • Public • Published

    utf8-deep-converter

    Utf8 converter, convert recursively for deep type such as Object and Array

    npm install utf8-deep-converter

    1. Install

    $ npm install --save utf8-deep-converter

    2. Usage

    const converter = require('utf8-deep-converter')
     
    converter.utf8DeepEncode({obj:'可以',数组:['','可以'],normal:'pass'}) //utf8 encode
    // {"obj":"可以","normal":"pass","数组":["也","可以"]}
    converter.utf8DeepDecode({"obj":"可以","normal":"pass","数组":["也","可以"]}) //utf8 decode
    // {"obj":"可以","normal":"pass","数组":["也","可以"]}

    3. Api

    Init

    const converter = require('utf8-deep-converter')

    Function

    converter.utf8DeepEncode()

    encode utf8 type data

    arguments required description
    obj true recursive encode, auto passing normal type

    converter.utf8DeepDecode()

    decode utf8 type data

    arguments required description
    obj true recursive encode, auto passing normal type

    Install

    npm i utf8-deep-converter

    DownloadsWeekly Downloads

    4

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    13.9 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar