INNER CODE UNIT · JavaScript

cutString

hisabi-app/hisabi · resources/js/Utils/index.js:34

export const cutString = (stringValue, upTo) => {
    if(stringValue.length > upTo) {
        return stringValue.substr(0, upTo) + '...'
    }

    return stringValue
}

export const colors = () => {
    return [
        {tailwind: 'bg-red-500', hex: '#ef4444'},
        {tailwind: 'bg-amber-500', hex: '#f59e0b'},
        {tailwind: 'bg-orange-500', hex: '#f97316'},
        {tailwind: 'bg-yellow-500', hex: '#eab308'},
        {tailwind: 'bg-green-500', hex: '#22c55e'},
        {tailwind: 'bg-lime-500', hex: '#84cc16'},
        {tailwind: 'bg-sky-500', hex: '#0ea5e9'},
        {tailwind: 'bg-teal-500', hex: '#14b8a6'},

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…