node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org ยป


JavaScript/NodeJS str2obj v1.0.0

What is this?

str2obj is a function that converts a nice literal string into an object.

Demo online





		<script type="text/javascript" src=""></script>

		<script type="text/javascript">

			console.log(str2obj('name(password), min(6), error(false)', true));


					name: 'password',
					min: 6,
					error: false


			console.log(str2obj('words(one, two, three) width(800, 600)'));


					words: ['one, 'two', 'three'],
					width: [800, 600]





	<body>See the console log.</body>