Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
save-csv
Advanced tools
Readme
Download an array of objects as a CSV file in the browser
save-csv
is a tiny library (892 bytes gzipped) that creates an CSV file from a array of objects with matching keys and triggers a download in the browser. Features:
,
) based on the user's regional settings.<script src="save-csv.min.js"></script>
saveCsv([
{a:1, b:2},
{a:3, b:4},
]);
a,b
1,2
3,4
array
Array: An array containing objects with matching keys.options
Object
filename
string: The filename to save to. Default: export.csv
.sep
string: The value separator (usually ,
). Recognizes the special value auto
with which automatic detection based on the user's regional settings is attempted (See #1). Default: auto
.eol
string: The line separator. Default: \r\n
.quote
string: The quote character to use. Default: "
.bom
boolean: Whether to include a byte order mark in the output. Default: true
.mime
string: The mime type for the file. Default: text/csv;charset=utf-8
.formatter
Function: A custom formatter function for values. The default function handles sep
in values and uses JSON.stringify for complex values. Receives
value`.© silverwind, distributed under BSD licence
FAQs
Download an array of objects as a CSV file in the browser
The npm package save-csv receives a total of 886 weekly downloads. As such, save-csv popularity was classified as not popular.
We found that save-csv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.