axiodb
Version:
The Pure JavaScript Alternative to SQLite. Embedded NoSQL database for Node.js with MongoDB-style queries, zero native dependencies, built-in InMemoryCache, and web GUI. Perfect for desktop apps, CLI tools, and embedded systems. No compilation, no platfor
51 lines • 1.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable @typescript-eslint/no-explicit-any */
class Converter {
static ToObject() {
throw new Error("Method not implemented.");
}
constructor() { } // Empty constructor
/**
* Converts a string to a boolean.
* @param value The string to convert.
* @returns The boolean value.
*/
ToBoolean(value) {
return value === "true";
}
/**
* Converts a string to a number.
* @param value The string to convert.
* @returns The number value.
*/
ToNumber(value) {
return parseInt(value);
}
/**
* Converts a string to a JSON object.
* @param value The string to convert.
* @returns The JSON object.
*/
ToObject(value) {
return JSON.parse(value);
}
/**
* Converts a JSON object to a string.
* @param value The JSON object to convert.
* @returns The string.
*/
ToString(value) {
return JSON.stringify(value);
}
/**
* Converts a string to a string array.
* @param value The string to convert.
* @returns The string array.
*/
ToStringArray(value) {
return value.split(",");
}
}
exports.default = Converter;
//# sourceMappingURL=Converter.helper.js.map