Last active
February 27, 2016 20:19
-
-
Save g8up/857303297a31ee7a87c4 to your computer and use it in GitHub Desktop.
Sttdecode.fn.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sttdecode = function(rawData) { | |
if (rawData == "") { | |
return false | |
} | |
var kvs = rawData.split("/"); | |
var obj = {}; | |
kvs.forEach(function ( kv ) { | |
if (kv.indexOf("@=") > -1) { | |
var a = kv.split("@="); | |
obj[ de_filter_str(a[0]) ] = de_filter_str(a[1]); | |
} | |
}); | |
return obj; | |
} | |
getsttdata = function ( obj, key ) { | |
return obj[key] || null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment