UNPKG

@knapsack/app

Version:

Build Design Systems on top of knapsack, by Basalt

28 lines 1.03 kB
import { GenericResponse } from '@knapsack/core/types'; import { KsTemplateSpec } from '../schemas/patterns'; export declare function validateSpec(spec: KsTemplateSpec): GenericResponse; /** * Is Some Of This Array In That Array? * Are any of the items in arrayA in arrayB? */ export declare function hasItemsInItems(arrayA: any[], arrayB: any[]): boolean; /** * Make an array unique by removing duplicate entries. * @param {Array} ar - Array to make unique * @returns {Array} - A unique array */ export declare function uniqueArray(ar: any[]): any[]; /** * Flatten nest array * @param {Array} arr * @return {Array} * @link https://stackoverflow.com/a/15030117 */ export declare function flattenNestedArray<T>(arr: T[]): T[]; export declare function flattenArray<T>(arrayOfArrays: T[][]): T[]; export declare function isBase64(v: any, { mimeRequired, allowMime }?: { mimeRequired?: boolean; allowMime?: boolean; }): boolean; export declare function timer(): () => number; //# sourceMappingURL=utils.d.ts.map