You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@json2csv/plainjs

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@json2csv/plainjs - npm Package Compare versions

Comparing version

to
6.0.0-alpha.4

8

package.json
{
"name": "@json2csv/plainjs",
"version": "6.0.0-alpha.2",
"version": "6.0.0-alpha.4",
"description": "Pure Javascript JSON to CSV converter.",

@@ -28,3 +28,3 @@ "keywords": [

"exports": {
"./*": "./src/*.js",
"./*": "./src/*",
".": "./src/index.js"

@@ -37,5 +37,7 @@ },

"test-with-coverage": "c8 --reporter=text npm test",
"test:raw": "node test"
"test:raw": "node test",
"deprendencies:update-internal": "npm uninstall @json2csv/formatters && npm install @json2csv/formatters"
},
"dependencies": {
"@json2csv/formatters": "^6.0.0-alpha.4",
"@streamparser/json": "^0.0.8",

@@ -42,0 +44,0 @@ "lodash.get": "^4.4.2"

# @json2csv/plainjs
[![npm version](https://badge.fury.io/js/json2csv.svg)](http://badge.fury.io/js/json2csv)
[![npm version](https://badge.fury.io/js/@json2csv%2Fplainjs.svg)](https://badge.fury.io/js/@json2csv%2Fplainjs)
[![npm monthly downloads](https://img.shields.io/npm/dm/@json2csv/plainjs.svg)](https://badge.fury.io/js/@json2csv%2Fplainjs)
[![Node.js CI](https://github.com/juanjoDiaz/json2csv/actions/workflows/on-push.yaml/badge.svg)](https://github.com/juanjoDiaz/json2csv/actions/workflows/on-push.yaml)
[![Coverage Status](https://coveralls.io/repos/github/juanjoDiaz/json2csv/badge.svg?branch=main)](https://coveralls.io/github/juanjoDiaz/json2csv?branch=main)
[![license](https://img.shields.io/npm/l/@json2csv/plainjs)](https://raw.githubusercontent.com/juanjoDiaz/json2csv/main/LICENSE.md)

@@ -12,8 +14,8 @@ Fast and highly configurable JSON to CSV converter.

## Requirements
This package includes two modules:
* **[Parser](#parser):** A synchronous JSON to CSV converter written in plain js. It's fast and simple, but it loads the entire dataset in memory and block the event loop. So it's not advisable for big dataset or the browser.
* **[Stream Parser](#stream-parser):** An asynchronous JSON to CSV converter written in plain js. Ideal for large dataset and the browser.
- None
### Features
## Features
- Fast and lightweight

@@ -31,2 +33,20 @@ - Support for standard JSON as well as NDJSON

### Other json2csv packages
There are multiple flavours of json2csv:
* **[Plainjs](https://www.npmjs.com/package/@json2csv/plainjs):** Includes the `Parser` API and a new `StreamParser` API which doesn't the conversion in a streaming fashion in pure js.
* **[Node](https://www.npmjs.com/package/@json2csv/node):** Includes the `Node Transform` and `Node Async Parser` APIs for Node users.
* **[WHATWG](https://www.npmjs.com/package/@json2csv/whatwg):** Includes the `WHATWG Transform Stream` and `WHATWG Async Parser` APIs for users of WHATWG streams (browser, Node or Deno).
* **[CLI](https://www.npmjs.com/package/@json2csv/cli):** Includes the `CLI` interface.
And a couple of libraries that enable additional configurations:
* **[Transforms](https://www.npmjs.com/package/@json2csv/transforms):** Includes the built-in `transforms` for json2csv (unwind and flatten) allowing the using to transform data before is parsed.
* **[Formatters](https://www.npmjs.com/package/@json2csv/formatters):** Includes the built-in `formatters` for json2csv (one for each data type, an excel-specific one, etc.). Formatters convert JSON data types into CSV-compatible strings.
## Requirements
- None
## Installation

@@ -33,0 +53,0 @@

import lodashGet from 'lodash.get';
import defaultFormatter from '@json2csv/formatters/default';
import numberFormatterCtor from '@json2csv/formatters/number';
import stringFormatterCtor from '@json2csv/formatters/string';
import symbolFormatterCtor from '@json2csv/formatters/symbol';
import objectFormatterCtor from '@json2csv/formatters/object';
import defaultFormatter from '@json2csv/formatters/default.js';
import numberFormatterCtor from '@json2csv/formatters/number.js';
import stringFormatterCtor from '@json2csv/formatters/string.js';
import symbolFormatterCtor from '@json2csv/formatters/symbol.js';
import objectFormatterCtor from '@json2csv/formatters/object.js';
import { getProp, flattenReducer, fastJoin } from './utils.js';

@@ -8,0 +8,0 @@