/** * Wang Standard Library * * Core functions always available globally in Wang. * All functions are immutable and pipeline-friendly. */ export declare function sort_by(arr: any[], key?: string | ((item: any) => any)): any[]; export declare function reverse(arr: any[]): any[]; export declare function unique(arr: any[]): any[]; export declare function unique_by(arr: any[], key: string | ((item: any) => any)): any[]; export declare function group_by(arr: any[], key: string | ((item: any) => any)): Record; export declare function chunk(arr: any[], size?: number): any[][]; export declare function flatten(arr: any[], depth?: number): any[]; export declare function first(arr: any[], n?: number): any; export declare function last(arr: any[], n?: number): any; export declare function take(arr: any[], n: number): any[]; export declare function drop(arr: any[], n: number): any[]; export declare function shuffle(arr: any[]): any[]; export declare function sample(arr: any[], n?: number): any; export declare function zip(...arrays: any[][]): any[][]; export declare function partition(arr: any[], pred: (item: any) => boolean): [any[], any[]]; export declare function keys(obj: any): string[]; export declare function values(obj: any): any[]; export declare function entries(obj: any): [string, any][]; export declare function pick(obj: any, keys: string[]): any; export declare function omit(obj: any, keys: string[]): any; export declare function merge(...objects: any[]): any; export declare function get(obj: any, path: string | number, defaultValue?: any): any; export declare function set(obj: any, path: string, value: any): any; export declare function clone(obj: any): any; export declare function split(str: string, sep?: string): string[]; export declare function join(arr: any[], sep?: string): string; export declare function trim(str: string): string; export declare function trim_start(str: string): string; export declare function trim_end(str: string): string; export declare function replace_all(str: string, search: string, replace: string): string; export declare function upper(str: string): string; export declare function lower(str: string): string; export declare function capitalize(str: string): string; export declare function starts_with(str: string, search: string): boolean; export declare function ends_with(str: string, search: string): boolean; export declare function includes(strOrArr: string | any[], search: any): boolean; export declare function pad_start(str: string, length: number, char?: string): string; export declare function pad_end(str: string, length: number, char?: string): string; export declare function truncate(str: string, length: number, suffix?: string): string; export declare function map(arr: any[], fn: (item: any, index?: number) => any): Promise; export declare function filter(arr: any[], pred: (item: any, index?: number) => boolean): Promise; export declare function reduce(arr: any[], fn: (acc: any, item: any, index?: number) => any, init?: any): Promise; export declare function find(arr: any[], pred: (item: any, index?: number) => boolean): Promise; export declare function find_index(arr: any[], pred: (item: any, index?: number) => boolean): Promise; export declare function every(arr: any[], pred: (item: any, index?: number) => boolean): Promise; export declare function some(arr: any[], pred: (item: any, index?: number) => boolean): Promise; export declare function count(arr: any[], pred?: (item: any) => boolean): Promise; export declare function is_array(val: any): boolean; export declare function is_object(val: any): boolean; export declare function is_string(val: any): boolean; export declare function is_number(val: any): boolean; export declare function is_boolean(val: any): boolean; export declare function is_function(val: any): boolean; export declare function is_null(val: any): boolean; export declare function is_empty(val: any): boolean; export declare function min(arr: number[]): number; export declare function max(arr: number[]): number; export declare function sum(arr: number[]): number; export declare function avg(arr: number[]): number; export declare function median(arr: number[]): number; export declare function round(n: number, decimals?: number): number; export declare function floor(n: number): number; export declare function ceil(n: number): number; export declare function abs(n: number): number; export declare function clamp(n: number, min: number, max: number): number; export declare function range(start: number, end?: number, step?: number): number[]; export declare function sleep(ms: number): Promise; export declare function wait(ms: number): Promise; export declare function uuid(): string; export declare function to_json(obj: any, pretty?: boolean): string; export declare function from_json(str: string): any; export declare function to_base64(str: string): string; export declare function from_base64(str: string): string; export declare const stdlib: { sort_by: typeof sort_by; reverse: typeof reverse; unique: typeof unique; unique_by: typeof unique_by; group_by: typeof group_by; chunk: typeof chunk; flatten: typeof flatten; first: typeof first; last: typeof last; take: typeof take; drop: typeof drop; shuffle: typeof shuffle; sample: typeof sample; zip: typeof zip; partition: typeof partition; keys: typeof keys; values: typeof values; entries: typeof entries; pick: typeof pick; omit: typeof omit; merge: typeof merge; get: typeof get; set: typeof set; clone: typeof clone; split: typeof split; join: typeof join; trim: typeof trim; trim_start: typeof trim_start; trim_end: typeof trim_end; replace_all: typeof replace_all; upper: typeof upper; lower: typeof lower; capitalize: typeof capitalize; starts_with: typeof starts_with; ends_with: typeof ends_with; includes: typeof includes; pad_start: typeof pad_start; pad_end: typeof pad_end; truncate: typeof truncate; map: typeof map; filter: typeof filter; reduce: typeof reduce; find: typeof find; find_index: typeof find_index; every: typeof every; some: typeof some; count: typeof count; is_array: typeof is_array; is_object: typeof is_object; is_string: typeof is_string; is_number: typeof is_number; is_boolean: typeof is_boolean; is_function: typeof is_function; is_null: typeof is_null; is_empty: typeof is_empty; min: typeof min; max: typeof max; sum: typeof sum; avg: typeof avg; median: typeof median; round: typeof round; floor: typeof floor; ceil: typeof ceil; abs: typeof abs; clamp: typeof clamp; range: typeof range; sleep: typeof sleep; wait: typeof wait; uuid: typeof uuid; to_json: typeof to_json; from_json: typeof from_json; to_base64: typeof to_base64; from_base64: typeof from_base64; }; //# sourceMappingURL=index.d.ts.map