mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-07-05 21:09:19 +00:00
fix: query param booleans
This commit is contained in:
11
src/utils.js
11
src/utils.js
@ -33,6 +33,16 @@ function isValidHexColor(hexColor) {
|
||||
).test(hexColor);
|
||||
}
|
||||
|
||||
function parseBoolean(value) {
|
||||
if (value === "true") {
|
||||
return true;
|
||||
} else if (value === "false") {
|
||||
return false;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
function request(data, headers) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios({
|
||||
@ -54,4 +64,5 @@ module.exports = {
|
||||
encodeHTML,
|
||||
isValidHexColor,
|
||||
request,
|
||||
parseBoolean,
|
||||
};
|
||||
|
Reference in New Issue
Block a user