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
function compare(o1, o2) { | |
const type1 = Array.isArray(o1) ? 'array' : typeof o1; | |
const type2 = Array.isArray(o2) ? 'array' : typeof o2; | |
if (!!o1 !== !!o2) { | |
console.log('Different boolean value', o1, o2); | |
return false; | |
} | |
if (type1 !== type2) { | |
console.log('Different type', o1, o2); | |
return false; |
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
var getFloat = function(number, len) { | |
var lessZero = (number < 0); | |
var arr; | |
var result; | |
function zeroTail(n) { | |
return (new Array(n + 1)).join('0'); | |
} |
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
/** | |
* 对URL的参数进行读写和拼装的javascript函数 | |
* @param {string} url | |
* @return {function} 对应值或者修改后的url | |
* @example | |
* url = 'http://example.com?type=0&page=0'; | |
* | |
* // 返回包含所有参数及值的对象 | |
* urlSearchParam(url) | |
* |
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
[{ | |
"name": "未知", | |
"path": "M78,-670C75,-673,74,-671,74,-673C75,-675,73,-673,73,-673C71,-673,71,-675,70,-675C69,-674,69,-674,69,-674C69,-674,69,-674,68,-675C67,-676,59,-676,53,-673C53,-672,49,-670,50,-668C55,-662,46,-656,54,-653C56,-652,60,-648,59,-644C88,-643,73,-642,82,-652C84,-654,87,-654,90,-657C88,-658,87,-659,86,-658C83,-656,84,-661,82,-662C78,-662,80,-667,78,-670L78,-670zM54,-634C54,-634,54,-634,54,-634zM56,-635C56,-641,65,-628,68,-637C70,-646,72,-638,74,-643C71,-643,67,-644,59,-644C59,-643,59,-643,58,-642C53,-638,54,-643,53,-635C53,-634,53,-634,54,-634C54,-634,53,-634,54,-634C55,-628,56,-631,56,-635L56,-635zM272,-442C267,-444,266,-438,258,-444C259,-440,254,-435,262,-434C269,-433,262,-427,263,-424C267,-417,260,-422,283,-417C303,-413,296,-425,314,-428C340,-431,330,-442,345,-437C349,-436,351,-438,359,-429C361,-427,363,-427,365,-425C366,-422,367,-424,370,-426C376,-428,370,-428,372,-432C370,-434,370,-437,366,-437C359,-437,359,-442,357,-441C349,-437,354,-445,358,-446C361,-448,358,-449,358,-451C358,-46 |