str2obj

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

JavaScript/NodeJS str2obj v1.0.0

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

http://jsfiddle.net/yeikos/jwad5/

<html>

	<head>

		<title>str2obj</title>

		<script type="text/javascript" src="https://raw.github.com/yeikos/js.str2obj/master/str2obj.js"></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]

				}

			*/

		</script>

	</head>

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

</html>