Added JSDoc to members csv parser
refs https://github.com/TryGhost/Toolbox/issues/430 - Typings make developer's life nicer
This commit is contained in:
parent
1c746c0ca0
commit
971a562b46
@ -3,6 +3,13 @@ const pump = require('pump');
|
||||
const papaparse = require('papaparse');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} path - The path to the CSV to prepare
|
||||
* @param {Object.<string, string>} mapping - An object whose keys are headers in the input CSV and values are the header to replace it with
|
||||
* @param {Array<string>} [defaultLabels] - A list of labels to apply to every parsed member row
|
||||
* @returns
|
||||
*/
|
||||
module.exports = (path, mapping, defaultLabels = []) => {
|
||||
const inputMapping = Object.assign({}, mapping, {
|
||||
subscribed_to_emails: 'subscribed'
|
||||
|
Loading…
Reference in New Issue
Block a user