This file contains hidden or 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
/** | |
* Convert flat data to tree format | |
* | |
* @see http://blog.csdn.net/chelen_jak/article/details/21290769 | |
* | |
* @param {array} a json数据 | |
* @param {String} idStr id的字符串 | |
* @param {String} pidStr 父id的字符串 | |
* @param {String} childrenStr children的字符串 | |
* @return {array} 数组 |
This file contains hidden or 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
/** | |
* Force modify a URL to HTTPS if your website is under HTTPS | |
* | |
* @example resolveHttps('http://example.com') | |
* If you are under a HTTPS website, it'll return `https://example.com`, | |
* Else it'll return `http://example.com` | |
* | |
* @param {string} url | |
* @return {string} | |
*/ |
This file contains hidden or 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
/** | |
* Load a JavaScript file from the server, then execute it. | |
* | |
* Code comes from `https://github.com/ded/script.js` | |
* If your want more features, please follow the original | |
* | |
* @usage: | |
* loadScript('http://example.com/test.js', function() { | |
* console.log('Loaded') | |
* }); |
OlderNewer