UNPKG
poli-charts
Version:
latest (1.0.8)
1.0.8
1.0.7
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
The best graphics for your Hedera Network application NFTs.
poli-charts
/
src
/
utils
/
validateString.js
10 lines
(9 loc)
•
310 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
export
function
validateString
(
value, paramName
) {
if
(
typeof
value !==
"string"
|| value.
trim
() ===
""
) {
throw
new
Error
(
`POLI-CHARTS REPORT: -> Invalid parameter detected:
${paramName}
must be a non-empty string.`
); }
else
{
console
.
log
(
`Valid string
${paramName}
.`
); } }