@eleva-io/erp-sdk
Version:
SDK oficial para el ERP de Eleva
37 lines • 1.18 kB
TypeScript
/**
* Check if the code is running in a browser environment
*/
export declare const isBrowser: boolean;
/**
* Check if the code is running in a Node.js environment
*/
export declare const isNode: string | false;
/**
* Create a Buffer-like object that works in both browser and Node.js
*/
export declare function createBuffer(data: ArrayBuffer | Buffer | string): Buffer | Uint8Array;
/**
* Convert Buffer/Uint8Array to string
*/
export declare function bufferToString(buffer: Buffer | Uint8Array): string;
/**
* Create a File object that works in both environments
*/
export declare function createFile(data: CrossPlatformBuffer | string, name: string, type?: string): File | Blob;
/**
* Create FormData that works in both environments
*/
export declare function createFormData(): FormData;
/**
* Type for cross-platform buffer
*/
export type CrossPlatformBuffer = Uint8Array | ArrayBuffer;
/**
* Check if a value is a cross-platform buffer
*/
export declare function isCrossPlatformBuffer(value: unknown): value is CrossPlatformBuffer;
/**
* Type for cross-platform file
*/
export type CrossPlatformFile = File | Blob;
//# sourceMappingURL=compatibility.d.ts.map