1.0.2 • Published 5 years ago

@doshare/trim-value-of-obj v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

#trim-value-of-obj

delete spaces at the start and end of value of the Object.

#Installation

npm install trim-value-of-obj

#Demo

import DelSpacesOfObject from "../index.js";

let obj = {
    key: ' sds x ',
    key2: ['sfsd ', {key: '   xx   '}, ['x1', 'x2 ', ' x3']],
    key3: {
        k1: '     k1',
        k2: 'k2    ',
        k3: '   k3    '
    }
}

let delSpacesOfObject = new DelSpacesOfObject(obj);

/**
* {"key":"sds x","key2":["sfsd",{"key":"xx"},["x1","x2","x3"]],"key3":{"k1":"k1","k2":"k2","k3":"k3"}}
*/