From 67db3f94c3c2a4429b9ebd3d5e12dc7c9b1a070c Mon Sep 17 00:00:00 2001 From: Ryuichi Inagaki Date: Mon, 20 Aug 2018 22:12:56 +1000 Subject: [PATCH] ref #6 Updated README and bump up version to v1.1.0 --- CHANGELOG.md | 5 +++++ README.md | 17 +++++++++++++++++ package.json | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7369957..9fc93f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.1.0] - 2018-08-20 +### Added +- Allow semicolon as a field delimiter as it is commonly used in CSV in some regions. Thanks to @HKskn. + [PR #8](https://github.com/ryu1kn/csv-writer/pull/8), [#6](https://github.com/ryu1kn/csv-writer/pull/6) + ## [1.0.1] - 2018-08-09 ### Fixed - Fixed the issue that coverage report badge on README shows question mark. diff --git a/README.md b/README.md index 0d19b8e..4b8da6d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ # CSV Writer Convert objects/arrays into a CSV string or write them into a file. +It respects [RFC 4180](https://tools.ietf.org/html/rfc4180) for the output CSV format. ## Prerequisite @@ -133,6 +134,10 @@ console.log(csvStringifier.stringifyRecords(records)); Array of objects (`id` and `title` properties) or strings (field IDs). A header line will be written to the file only if given as an array of objects. + * fieldDelimiter `` (optional) + + Default: `,`. Only either comma `,` or semicolon `;` is allowed. + * encoding `` (optional) Default: `utf8`. @@ -162,6 +167,10 @@ console.log(csvStringifier.stringifyRecords(records)); Array of field titles + * fieldDelimiter `` (optional) + + Default: `,`. Only either comma `,` or semicolon `;` is allowed. + * encoding `` (optional) Default: `utf8`. @@ -201,6 +210,10 @@ console.log(csvStringifier.stringifyRecords(records)); Array of objects (`id` and `title` properties) or strings (field IDs) + * fieldDelimiter `` (optional) + + Default: `,`. Only either comma `,` or semicolon `;` is allowed. + ##### Returns: * `` @@ -230,6 +243,10 @@ console.log(csvStringifier.stringifyRecords(records)); Array of field titles + * fieldDelimiter `` (optional) + + Default: `,`. Only either comma `,` or semicolon `;` is allowed. + ##### Returns: * `` diff --git a/package.json b/package.json index 224c6dd..0fe3c32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "csv-writer", - "version": "1.0.1", + "version": "1.1.0", "description": "Convert objects/arrays into a CSV string or write them into a CSV file", "main": "index.js", "scripts": {