1.0.2 • Published 2 years ago

object-string-property-trimmer v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

remove-extra-spaces

if you need to remove extra spaces from object properties and string variables you can use this package

Usage

//objectTrim function using
let object = {
  key: '  hi  xD  ',
  key2: {
    key: 'hi   xD',
	key2: {
	  key: 'hi    xD'
	}
  }
}

object = objectTrim(object)
console.log(object.key2.key2.key) //hi xD

//stringTrim function using
let string = ' hi   xD  '

string = stringTrim(string)
console.log(string)//hi xD