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
function getQueryParams(url) { | |
const paramArr = url.slice(url.indexOf('?') + 1).split('&'); | |
const params = {}; | |
paramArr.map(param => { | |
const [key, val] = param.split('='); | |
params[key] = decodeURIComponent(val); | |
}) | |
return params; | |
} |
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
function truncateString(str, len, suffix) { | |
var suffix = suffix || "..."; | |
var len = len || 10; | |
if (str.length <= len) { | |
return str; | |
} else { | |
return str.slice(0, len - suffix.length) + suffix; | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<leads> | |
<lead> | |
<leadId>123</leadId> | |
<itemId>100321</itemId> | |
<clientId>c102030</clientId> | |
<status>NUR</status> | |
</lead> | |
<lead> | |
<leadId>124</leadId> |
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
Function StripAccent(thestring As String) | |
Dim A As String * 1 | |
Dim B As String * 1 | |
Dim i As Integer | |
Const AccChars= "áäčďéěíĺľňóôőöŕšťúůűüýřžÁÄČĎÉĚÍĹĽŇÓÔŐÖŔŠŤÚŮŰÜÝŘŽ" | |
Const RegChars= "aacdeeillnoooorstuuuuyrzAACDEEILLNOOOORSTUUUUYRZ" | |
For i = 1 To Len(AccChars) | |
A = Mid(AccChars, i, 1) | |
B = Mid(RegChars, i, 1) | |
thestring = Replace(thestring, A, B) |