Functions for JavaScript

"It's still web development, it's just way easier!"

JavaScript

Type Description Example Result
jsname Convert non-letters and non-digits to underscores. <#text:jsname>
jsvalue Escapes all quotes ( ' and " to \' and \" ). <#quotes:jsvalue>
json Convert a database table to JSON. <#ForSale:json>
{
	"123": {
		"Key": "123",
		"Description": "Short sleave shirt",
		"Price": "19.95"
	},
	"124": {
		"Key": "124",
		"Description": "Long sleave shirt",
		"Price": "24.95"
	}
}
jsonarray Convert a database table to JSON as an array. <#ForSale:jsonarray>
[
	{
		"Key": "123",
		"Description": "Short sleave shirt",
		"Price": "19.95"
	},
	{
		"Key": "124",
		"Description": "Long sleave shirt",
		"Price": "24.95"
	}
]