Ghost/ghost/members-csv
Nazar Gargol fd982fef73 Added mapping support to CSV parser
no issue

- When processing CSV files `parse` function now allows for the client to specify "mapping" parameter in format of a hash as follows:
{ destination_property_name: 'source_column_name'}
e.g.:
{
  name: 'weird_name_column',
  email: 'email_column'
}
- It is done so to allow for the end user to provide exact mapping of the fields to be transformed into JSON.
2020-07-02 14:53:56 +12:00
..
lib Added mapping support to CSV parser 2020-07-02 14:53:56 +12:00
test Added mapping support to CSV parser 2020-07-02 14:53:56 +12:00
.eslintrc.js Initialized members-csv package 2020-06-19 18:54:48 +12:00
index.js Fixed module paths 2020-06-19 19:52:21 +12:00
LICENSE Initialized members-csv package 2020-06-19 18:54:48 +12:00
package.json Published new versions 2020-06-19 19:52:52 +12:00
README.md Initialized members-csv package 2020-06-19 18:54:48 +12:00

Members Csv

Install

npm install @tryghost/members-csv --save

or

yarn add @tryghost/members-csv

Usage

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2020 Ghost Foundation - Released under the MIT license.