New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@byjohann/utils

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byjohann/utils - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

15

dist/csv.d.ts

@@ -5,5 +5,10 @@ /**

*/
declare function createCsv<T extends Record<string, any>>(data: T[], columns: (keyof T)[],
/** @default ',' */
delimiter?: string): string;
declare function createCSV<T extends Record<string, unknown>>(data: T[], columns: (keyof T)[], options?: {
/** @default ',' */
delimiter?: string;
/** @default true */
includeHeaders?: boolean;
/** @default false */
quoteAll?: boolean;
}): string;
/**

@@ -15,4 +20,4 @@ * Escapes a value for a CSV string.

*/
declare function escapeCsvValue(value: unknown): string;
declare function escapeCSVValue(value: unknown): string;
export { createCsv, escapeCsvValue };
export { createCSV, escapeCSVValue };
export { MaybeArray, toArray } from './array.js';
export { createCsv, escapeCsvValue } from './csv.js';
export { createCSV, escapeCSVValue } from './csv.js';
export { tryParseJSON } from './json.js';

@@ -4,0 +4,0 @@ export { interopDefault } from './module.js';

{
"name": "@byjohann/utils",
"type": "module",
"version": "0.3.2",
"version": "0.4.0",
"packageManager": "pnpm@9.5.0",

@@ -6,0 +6,0 @@ "description": "A collection of utilities for my projects",

@@ -36,3 +36,3 @@ # @byjohann/utils

#### `createCsv`
#### `createCSV`

@@ -42,11 +42,17 @@ Converts an array of objects to a comma-separated values (CSV) string that contains only the `columns` specified.

```ts
declare function createCsv<T extends Record<string, any>>(
declare function createCSV<T extends Record<string, unknown>>(
data: T[],
columns: (keyof T)[],
/** @default ',' */
delimiter?: string
options?: {
/** @default ',' */
delimiter?: string
/** @default true */
includeHeaders?: boolean
/** @default false */
quoteAll?: boolean
}
): string
```
#### `escapeCsvValue`
#### `escapeCSVValue`

@@ -59,3 +65,3 @@ Escapes a value for a CSV string.

```ts
declare function escapeCsvValue(value: unknown): string
declare function escapeCSVValue(value: unknown): string
```

@@ -62,0 +68,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc