INNER CODE UNIT · JavaScript
srid
lucasferreira/react-native-flash-message · src/FlashMessage.js:37
function srid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return `${s4()}-${s4()}-${s4()}`;
}
/**
* Translates icon prop value into complex internal object
*/
function parseIcon(icon = "none") {
if (!!icon && icon !== "none") {
if (typeof icon === "string" || typeof icon === "function") {
return { icon, position: "left", style: {} };
}