Comparing version 3.7.0 to 4.0.0-alpha.0
@@ -1,12 +0,2 @@ | ||
/** | ||
* @projectName fast-csv | ||
* @github https://github.com/C2FO/fast-csv | ||
* @includeDoc [Change Log] ../History.md | ||
* @header [../README.md] | ||
*/ | ||
/// <reference types="node" /> | ||
export { format, write, writeToStream, writeToBuffer, writeToString, writeToPath, FormatterOptionsArgs, Row as FormatterRow, RowMap as FormatterRowMap, RowArray as FormatterRowArray, RowHashArray as FormatterRowHashArray, RowTransformCallback as FormatterRowTransformCallback, RowTransformFunction as FormatterRowTransformFunction, } from './formatter'; | ||
export { parse, parseString, parseStream, parseFile, ParserOptionsArgs, Row as ParserRow, RowMap as ParserRowMap, RowArray as ParserRowArray, RowValidateCallback as ParserRowValidateCallback, SyncRowValidate as ParserSyncRowValidate, AsyncRowValidate as ParserAsyncRowValidate, RowValidate as ParserRowValidate, RowTransformCallback as ParserRowTransformCallback, SyncRowTransform as ParserSyncRowTransform, AsyncRowTransform as ParserAsyncRowTransform, RowTransformFunction as ParserRowTransformFunction, HeaderArray as ParserHeaderArray, HeaderTransformFunction as ParserHeaderTransformFunction, } from './parser'; | ||
export declare const fromString: (string: string, options?: import("./parser").ParserOptionsArgs | undefined) => import("./parser").CsvParserStream; | ||
export declare const fromStream: (stream: NodeJS.ReadableStream, options?: import("./parser").ParserOptionsArgs | undefined) => import("./parser").CsvParserStream; | ||
export declare const fromPath: (location: string, options?: import("./parser").ParserOptionsArgs) => import("./parser").CsvParserStream; | ||
export { format, write, writeToStream, writeToBuffer, writeToString, writeToPath, CsvFormatterStream, FormatterOptions, FormatterOptionsArgs, Row as FormatterRow, RowMap as FormatterRowMap, RowArray as FormatterRowArray, RowHashArray as FormatterRowHashArray, RowTransformCallback as FormatterRowTransformCallback, RowTransformFunction as FormatterRowTransformFunction, } from '@fast-csv/format'; | ||
export { parse, parseString, parseStream, parseFile, ParserOptions, CsvParserStream, ParserOptionsArgs, Row as ParserRow, RowMap as ParserRowMap, RowArray as ParserRowArray, RowValidateCallback as ParserRowValidateCallback, SyncRowValidate as ParserSyncRowValidate, AsyncRowValidate as ParserAsyncRowValidate, RowValidate as ParserRowValidate, RowTransformCallback as ParserRowTransformCallback, SyncRowTransform as ParserSyncRowTransform, AsyncRowTransform as ParserAsyncRowTransform, RowTransformFunction as ParserRowTransformFunction, HeaderArray as ParserHeaderArray, HeaderTransformFunction as ParserHeaderTransformFunction, } from '@fast-csv/parse'; |
"use strict"; | ||
/** | ||
* @projectName fast-csv | ||
* @github https://github.com/C2FO/fast-csv | ||
* @includeDoc [Change Log] ../History.md | ||
* @header [../README.md] | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const util_1 = require("util"); | ||
const parser_1 = require("./parser"); | ||
var formatter_1 = require("./formatter"); | ||
exports.format = formatter_1.format; | ||
exports.write = formatter_1.write; | ||
exports.writeToStream = formatter_1.writeToStream; | ||
exports.writeToBuffer = formatter_1.writeToBuffer; | ||
exports.writeToString = formatter_1.writeToString; | ||
exports.writeToPath = formatter_1.writeToPath; | ||
var parser_2 = require("./parser"); | ||
exports.parse = parser_2.parse; | ||
exports.parseString = parser_2.parseString; | ||
exports.parseStream = parser_2.parseStream; | ||
exports.parseFile = parser_2.parseFile; | ||
exports.fromString = util_1.deprecate(parser_1.parseString, 'csv.fromString has been deprecated in favor of csv.parseString'); | ||
exports.fromStream = util_1.deprecate(parser_1.parseStream, 'csv.fromStream has been deprecated in favor of csv.parseStream'); | ||
exports.fromPath = util_1.deprecate(parser_1.parseFile, 'csv.fromPath has been deprecated in favor of csv.parseFile'); | ||
var format_1 = require("@fast-csv/format"); | ||
exports.format = format_1.format; | ||
exports.write = format_1.write; | ||
exports.writeToStream = format_1.writeToStream; | ||
exports.writeToBuffer = format_1.writeToBuffer; | ||
exports.writeToString = format_1.writeToString; | ||
exports.writeToPath = format_1.writeToPath; | ||
exports.CsvFormatterStream = format_1.CsvFormatterStream; | ||
exports.FormatterOptions = format_1.FormatterOptions; | ||
var parse_1 = require("@fast-csv/parse"); | ||
exports.parse = parse_1.parse; | ||
exports.parseString = parse_1.parseString; | ||
exports.parseStream = parse_1.parseStream; | ||
exports.parseFile = parse_1.parseFile; | ||
exports.ParserOptions = parse_1.ParserOptions; | ||
exports.CsvParserStream = parse_1.CsvParserStream; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "fast-csv", | ||
"version": "3.7.0", | ||
"version": "4.0.0-alpha.0", | ||
"description": "CSV parser and writer", | ||
@@ -8,11 +8,10 @@ "main": "./build/src/index.js", | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"build": "tsc", | ||
"mocha": "nyc mocha", | ||
"test": "npm run lint && npm run mocha", | ||
"lint": "eslint --ext=.js,.ts src/ test/ examples/", | ||
"lint-fix": "eslint --fix --ext=.js,.ts src/ test/ examples/", | ||
"benchmark": "node ./benchmark", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls" | ||
"build": "npm run clean && npm run compile", | ||
"clean": "rm -rf ./build && rm -rf tsconfig.tsbuildinfo", | ||
"compile": "tsc -p tsconfig.build.json" | ||
}, | ||
"directories": { | ||
"lib": "src", | ||
"test": "__tests__" | ||
}, | ||
"files": [ | ||
@@ -36,34 +35,2 @@ "build/src/**" | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/lodash.escaperegexp": "^4.1.6", | ||
"@types/lodash.isboolean": "^3.0.6", | ||
"@types/lodash.isequal": "^4.5.5", | ||
"@types/lodash.isfunction": "^3.0.6", | ||
"@types/lodash.isnil": "^4.0.6", | ||
"@types/lodash.isstring": "^4.0.6", | ||
"@types/lodash.isundefined": "^3.0.6", | ||
"@types/lodash.partition": "^4.6.6", | ||
"@types/lodash.uniq": "^4.5.6", | ||
"@types/lodash.groupby": "^4.6.6", | ||
"@types/mocha": "^5.2.7", | ||
"@types/sinon": "^7.5.1", | ||
"@typescript-eslint/eslint-plugin": "^2.11.0", | ||
"@typescript-eslint/parser": "^2.11.0", | ||
"coveralls": "^3.0.9", | ||
"eslint": "^6.7.2", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-plugin-import": "^2.19.1", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"husky": "^3.1.0", | ||
"lodash.partition": "^4.6.0", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.1.1", | ||
"prettier": "^1.19.1", | ||
"sinon": "^7.5.0", | ||
"source-map-support": "^0.5.16", | ||
"ts-node": "^8.5.4", | ||
"typescript": "^3.7.3" | ||
}, | ||
"engines": { | ||
@@ -73,13 +40,7 @@ "node": ">=8.0.0" | ||
"dependencies": { | ||
"@types/node": "^12.12.17", | ||
"lodash.escaperegexp": "^4.1.2", | ||
"lodash.groupby": "^4.6.0", | ||
"lodash.isboolean": "^3.0.3", | ||
"lodash.isequal": "^4.5.0", | ||
"lodash.isfunction": "^3.0.9", | ||
"lodash.isnil": "^4.0.0", | ||
"lodash.isstring": "^4.0.1", | ||
"lodash.isundefined": "^3.0.1", | ||
"lodash.uniq": "^4.5.0" | ||
} | ||
"@fast-csv/format": "^4.0.0-alpha.0", | ||
"@fast-csv/parse": "^4.0.0-alpha.0", | ||
"@types/node": "^12.12.17" | ||
}, | ||
"gitHead": "9b3bcc76a7ee0ae689069eb575b39a6676f157ae" | ||
} |
@@ -1,10 +0,5 @@ | ||
[![npm version](https://img.shields.io/npm/v/fast-csv.svg)](https://www.npmjs.org/package/fast-csv) | ||
[![Build Status](https://travis-ci.org/C2FO/fast-csv.svg?branch=master)](https://travis-ci.org/C2FO/fast-csv) | ||
[![Coverage Status](https://coveralls.io/repos/github/C2FO/fast-csv/badge.svg?branch=master)](https://coveralls.io/github/C2FO/fast-csv?branch=master) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/C2FO/fast-csv/badge.svg?targetFile=package.json)](https://snyk.io/test/github/C2FO/fast-csv?targetFile=package.json) | ||
# `fast-csv` | ||
# Fast-csv | ||
Package that combines both [`@fast-csv/format`](../format) and [`@fast-csv/parse`](../parse) into a single package. | ||
Fast-csv is library for parsing and formatting csvs or any other delimited value file in node. | ||
## Installation | ||
@@ -16,3 +11,3 @@ | ||
To use `fast-csv` in `javascript` you can require the module/ | ||
To use `fast-csv` in `javascript` you can require the module | ||
@@ -31,44 +26,9 @@ ```js | ||
* [Parsing Docs](./docs/parsing.md) | ||
* [Formatting Docs](./docs/formatting.md) | ||
* [Parsing Docs](../parse/README.md) | ||
* [Formatting Docs](../format/README.md) | ||
### Quick Examples | ||
### Examples | ||
**parsing** | ||
* [JavaScript Examples](../../examples/fast-csv-js/README.md) | ||
* [TypeScript Examples](../../examples/fast-csv-ts/README.md) | ||
To read a csv with headers create a read stream and pipe it to parser. | ||
```javascript | ||
fs.createReadStream('path/to/my.csv') | ||
.pipe(csv.parse({ headers: true })) | ||
.on('data', row => console.log(row)) | ||
``` | ||
For more in depth parsing examples and docs check out the [parsing docs](./docs/parsing.md) | ||
**formatting** | ||
To format a csv you can write rows to a formatter. | ||
```javascript | ||
someStream | ||
.pipe(csv.format({ headers: true }) | ||
.pipe(process.stdout); | ||
``` | ||
For more in depth formatting examples and docs check out the [formatting docs](./docs/formatting.md) | ||
### Migrating from older versions | ||
* [From `v2.x` to `v3.x`](./docs/migration_guide.md#from-v2x-to-v3x) | ||
## License | ||
MIT <https://github.com/C2FO/fast-csv/raw/master/LICENSE> | ||
## Meta | ||
* Code: `git clone git://github.com/C2FO/fast-csv.git` | ||
* Website: <http://c2fo.com> | ||
* Twitter: [http://twitter.com/c2fo](http://twitter.com/c2fo) - 877.465.4045 | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
3
0
0
4959
6
23
2
33
1
+ Added@fast-csv/format@4.3.5(transitive)
+ Added@fast-csv/parse@4.3.6(transitive)
+ Added@types/node@14.18.63(transitive)
- Removedlodash.escaperegexp@^4.1.2
- Removedlodash.groupby@^4.6.0
- Removedlodash.isboolean@^3.0.3
- Removedlodash.isequal@^4.5.0
- Removedlodash.isfunction@^3.0.9
- Removedlodash.isnil@^4.0.0
- Removedlodash.isstring@^4.0.1
- Removedlodash.isundefined@^3.0.1
- Removedlodash.uniq@^4.5.0
- Removedlodash.isstring@4.0.1(transitive)