Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 343 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 343 Bytes

js-decode

JavaScript decode function, Just like Oracle decode function!

Example:

var a = 'list';
console.log(
decode(
	a,
	'test', '这是测试',
	'list', function(a){
		return 'list:' + a;
	}, function(s){
		return decode(
			true,
			/^test/.test(s), 'tester',
			/^list/.test(s), 'lister',
			s
		);
	}
));