@punks/backend-core 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/utils/csv.d.ts +1 -1
- package/dist/cjs/types/utils/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/utils/csv.d.ts +1 -1
- package/dist/esm/types/utils/index.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const csvParse: (data: string | string[] | Buffer, separator?: string) => Record<string, any>[];
|
|
3
3
|
export interface CsvColumnDefinition<T> {
|
|
4
4
|
name: string;
|
|
5
5
|
value: (item: T) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./array";
|
|
2
|
-
export { CsvColumnDefinition as ColumnDefinition, CsvBuildOptions, csvBuild,
|
|
2
|
+
export { CsvColumnDefinition as ColumnDefinition, CsvBuildOptions, csvBuild, csvParse, } from "./csv";
|
|
3
3
|
export { getDirectoryFilePaths } from "./files";
|
|
4
4
|
export { joinPath, splitPath, ensureDirectory, getDirectoryPath } from "./paths";
|
|
5
5
|
export * from "./strings";
|
package/dist/esm/index.js
CHANGED
|
@@ -211,7 +211,7 @@ const splitRows = (data) => {
|
|
|
211
211
|
}
|
|
212
212
|
return data;
|
|
213
213
|
};
|
|
214
|
-
const
|
|
214
|
+
const csvParse = (data, separator = DEFAULT_DELIMITER) => {
|
|
215
215
|
const rows = splitRows(data);
|
|
216
216
|
const records = [];
|
|
217
217
|
if (rows.length === 0) {
|
|
@@ -28334,5 +28334,5 @@ const excelParse = (file, options) => {
|
|
|
28334
28334
|
.map((x) => aggregateRow(header, x, options));
|
|
28335
28335
|
};
|
|
28336
28336
|
|
|
28337
|
-
export { ExcelKeyTransform, Log, LogLevel, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, csvBuild,
|
|
28337
|
+
export { ExcelKeyTransform, Log, LogLevel, byField, byFieldDesc, camelToKebabCase, camelToSnakeCase, csvBuild, csvParse, distinct, distinctElements, ensureDirectory, ensureStartSlash, ensureTailingSlash, excelBuild, excelParse, first, flatten, getDirectoryFilePaths, getDirectoryPath, indexes, isNullOrUndefined, iterate, joinPath, jsonDistinct, last, newUuid, notNull, notUndefined, pluralize, range, removeUndefinedProps, selectMany, sleep, sort, splitPath, toCamelCase, toDict, toMap, toTitleCase, trim$1 as trim, trimEnd, trimStart };
|
|
28338
28338
|
//# sourceMappingURL=index.js.map
|