convert-to-object
Convert string to object and fix syntax errors.
Installation
$ npm install convert-to-object
Usage
const toObject = ; console;// => {name: 'tutu', nickname: 'tutu', email: 'tutu', other: 'toto, titi, and test don\'t do this !'}console;// => {toto: 'tutu', titi: 'tutu', test: 'tutu', tutu: 'toto, titi, and test don\'t do this !'}console;// => {toto: 'tutu', titi: 'tutu', test: 'tutu', tutu: 'toto, titi, and test don\'t do this !'}console;// => {toto: 'tutu', titi: 'tutu', test: 'tutu', tutu: 'toto, titi, and test don\'t do this !'}console;// => {test: {test2: 'test3'}}console;console;console;console;console;console;