بنقرة واحدة
csv-encoding
Use when generating CSVs in APIs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when generating CSVs in APIs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when scanning NestJS providers with DiscoveryService-backed utilities.
Use when working with the @wisemen/nestjs-custom-fields package — developer-defined custom fields in NestJS with TypeORM persistence and runtime validation. Covers registering the CustomFieldDefinition entity, authoring definitions with customFieldDefinition(), storing resolved values via @CustomFieldValueColumn(), exposing them through CustomFieldValueDto / @IsCustomFields(), and validating submissions with CustomFieldDefinitionsRepository + validateCustomFieldValues(). Use this whenever a task involves custom field definitions, CustomFieldValue columns, custom-field DTOs, or tenant-scoped field definitions, even if the package is not named explicitly.
Use when defining Typesense collections, collectors, and search queries in NestJS APIs.
Generate PDFs through API2PDF in NestJS. Use when converting HTML or URLs to PDFs in apis.
Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator.
Use when configuring NATS messaging, subscribers, or the simple NatsClient in NestJS applications.
| name | csv-encoding |
| description | Use when generating CSVs in APIs. |
Use @wisemen/csv when you need to turn row objects into CSV text or a
readable CSV stream. The package exposes two encoding paths:
CSV.encode(records, options) returns one CSV string.CSV.encodeStream(records, options) returns a Readable that yields CSV
chunks.Pick encode() for small, already-materialized arrays. Pick encodeStream()
when rows come from an iterable or async iterable, or when the response should
be streamed.
import { CSV } from '@wisemen/csv'
const csv = CSV.encode(
[
{ name: 'John Doe', age: '30' },
{ name: 'Jane Doe', age: '25' },
],
{ columns: ['name', 'age'] }
)
This returns:
name;age
John Doe;30
Jane Doe;25
import { CSV } from '@wisemen/csv'
const stream = CSV.encodeStream(sourceRows, {
columns: ['name', 'age'],
})
Use the stream variant for HTTP downloads and large exports. The output still contains the header row first, but the CSV is emitted in chunks instead of one fully buffered string.
;.delimiter to override it, including multi-character delimiters.columns controls both header order and field order.CSV.encode() derives columns from the first record when they are omitted.CSV.encodeStream() also derives columns from the first emitted record when
they are omitted.null and undefined are encoded as empty fields." or a newline are wrapped in quotes." characters are escaped as "".encode() does not add a trailing newline after the last row.encodeStream() writes \n after the header and after every emitted row.encodeStream() accepts both Iterable<Record<...>> and
AsyncIterable<Record<...>>.batchSize controls how many data rows are buffered before a chunk is
yielded.maxChunkBytes forces a chunk flush once the buffered CSV text reaches the
configured byte size.columns are provided, the stream emits only the
header row.columns are omitted, the stream emits nothing.