
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
@tryghost/members-csv
Advanced tools
## Usage There are 2 parts to this package: CSV to JSON serialization and JSON to CSV serialization. The module exposes 2 methods to fulfil these: `parse` and `unparse` respectively.
There are 2 parts to this package: CSV to JSON serialization and JSON to CSV serialization. The module exposes 2 methods to fulfil these: parse
and unparse
respectively.
To parse
CSV file and convert it to JSON use parse
method, e.g.:
const {parse} = require('@tryghost/members-csv');
const mapping = {
email: 'csv_column_containing_email_data',
name: 'csv_column_containing_names_data'
}
const membersJSON = await parse(csvFilePath, mapping);
csvFilePath
- is a path to the CSV file that has to be processed
mapping
- optional parameter, it's a hash describing custom mapping for CSV columns to JSON properties
Example mapping for CSV having email under correo_electronico
column would look like following:
{
email: 'correo_electronico'
}
To unparse
JSON to CSV compatible with members format use following:
const {unparse} = require('@tryghost/members-csv');
const members = [{
email: 'email@example.com',
name: 'Sam Memberino',
note: 'Early supporter'
}];
const membersCSV = unparse(members);
console.log(membersCSV);
// -> "id,email,name,note,subscribed_to_emails,complimentary_plan,stripe_customer_id,created_at,deleted_at,labels\r\n,email@example.com,Sam Memberino,Early supporter,,,,,,"
FAQs
## Usage There are 2 parts to this package: CSV to JSON serialization and JSON to CSV serialization. The module exposes 2 methods to fulfil these: `parse` and `unparse` respectively.
The npm package @tryghost/members-csv receives a total of 5,978 weekly downloads. As such, @tryghost/members-csv popularity was classified as popular.
We found that @tryghost/members-csv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 28 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.