This commit is contained in:
Benjamin Toby 2024-12-12 07:06:37 +01:00
parent 5ed9547e0c
commit da6b0b43c9
3 changed files with 19 additions and 17 deletions

14
index.d.ts vendored
View File

@ -1,2 +1,12 @@
export const dsqlUtils: typeof import("./package-shared/utils"); export namespace dsqlUtils {
export { datasquirel }; export { serializeQuery };
export { serializeCookies };
export { EJSON };
export { numberfy };
export { slugify };
}
import serializeQuery = require("./package-shared/utils/serialize-query");
import serializeCookies = require("./package-shared/utils/serialize-cookies");
import EJSON = require("./package-shared/utils/ejson");
import numberfy = require("./package-shared/utils/numberfy");
import slugify = require("./package-shared/utils/slugify");

View File

@ -102,6 +102,11 @@ const datasquirel = {
}, },
}; };
exports.dsqlUtils = require("./package-shared/utils");
exports.datasquirel = datasquirel;
module.exports = datasquirel; module.exports = datasquirel;
exports.dsqlUtils = {
serializeQuery,
serializeCookies,
EJSON,
numberfy,
slugify,
};

View File

@ -1,13 +0,0 @@
export const numberfy: (num: any, decimals?: number) => number;
export const slugify: (str: string) => string;
export const serializeCookies: typeof import("./serialize-cookies");
export const serializeQuery: typeof import("./serialize-query");
export const trimSql: typeof import("./trim-sql");
export const EJSON: {
parse: (string: string | null | number, reviver?: (this: any, key: string, value: any) => any) => {
[x: string]: any;
} | {
[x: string]: any;
}[] | undefined;
stringify: (value: any, replacer?: ((this: any, key: string, value: any) => any) | null, space?: string | number) => string | undefined;
};