PHP Classes

File: resources/js/lib/utils.ts

Recommend this page to a friend!
  Packages of Niko Peikrishvili   Ticker   resources/js/lib/utils.ts   Download  
File: resources/js/lib/utils.ts
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Ticker
Application to track and manage to do tasks
Author: By
Last change:
Date: 2 months ago
Size: 469 bytes
 

Contents

Class file image Download
import type { Updater } from "@tanstack/vue-table" import type { ClassValue } from "clsx" import type { Ref } from "vue" import { clsx } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } export function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) { ref.value = typeof updaterOrValue === "function" ? updaterOrValue(ref.value) : updaterOrValue }