kiutils
Version:
🎑 (Library) an Javascript library that provide various utilities, including Image manipulation tools, Discord-related utilities, and a logger.
35 lines • 1.1 kB
TypeScript
/// <reference types="node" />
export declare class Utils {
/**
* Writes the data as file
* @param {Buffer|string} data data to write
* @param {string} name file name
* @returns {void}
*/
static write(data: Buffer | string, name: string): void;
/**
* Asynchronously writes the data as file
* @param {Buffer|string} data data to write
* @param {string} name file name
* @returns {Promise<void>}
*/
static writeAsync(data: Buffer | string, name: string): Promise<void>;
/**
* Reads the file as buffer
* @param {string} name file name
* @returns {Buffer} file data
* @example
* const { Utils } = require("kiutils")
* const data = Utils.read("file.txt")
* console.log(data.toString())
* // => "Hello World!"
*/
static read(name: string): Buffer;
/**
* Asynchronously reads the file as buffer
* @param {string} name file name
* @returns {Promise<Buffer>} file data
*/
static readAsync(name: string): Promise<Buffer>;
}
//# sourceMappingURL=utils.d.ts.map