@daybrush/utils
Advanced tools
Comparing version
@@ -0,4 +1,5 @@ | ||
import { ObjectInterface } from "./consts"; | ||
export declare function hasClass(element: HTMLElement, className: string): boolean; | ||
export declare function addClass(element: HTMLElement, className: string): void; | ||
export declare function removeClass(element: HTMLElement, className: string): void; | ||
export declare function fromCSS(elements: HTMLElement | HTMLElement[] | NodeListOf<HTMLElement>, properties: string[]): {}; | ||
export declare function fromCSS(elements: HTMLElement | HTMLElement[] | NodeListOf<HTMLElement>, properties: string[]): ObjectInterface<any>; |
@@ -0,3 +1,4 @@ | ||
import { ObjectInterface } from "./consts"; | ||
export declare function isUndefined(value: any): value is undefined; | ||
export declare function isObject(value: any): value is object; | ||
export declare function isObject(value: any): value is ObjectInterface<any>; | ||
export declare function isArray(value: any): value is any[]; | ||
@@ -4,0 +5,0 @@ export declare function isString(value: any): value is string; |
{ | ||
"name": "@daybrush/utils", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "utils for daybrush", | ||
@@ -5,0 +5,0 @@ "main": "dist/utils.js", |
@@ -0,5 +1,7 @@ | ||
import { ObjectInterface } from "./consts"; | ||
export function isUndefined(value: any): value is undefined { | ||
return (typeof value === "undefined"); | ||
} | ||
export function isObject(value: any): value is object { | ||
export function isObject(value: any): value is ObjectInterface<any> { | ||
return value && (typeof value === "object"); | ||
@@ -6,0 +8,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
64281
0.48%1092
0.28%