Comparing version 3.7.2 to 3.7.3
@@ -0,1 +1,16 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
<a name="3.7.4"></a> | ||
## [3.7.4](https://github.com/zemirco/json2csv/compare/v3.7.1...v3.7.4) (2016-12-08) | ||
### Bug Fixes | ||
* **jsdoc:** JSDoc Editting ([#155](https://github.com/zemirco/json2csv/issues/155)) ([76075d6](https://github.com/zemirco/json2csv/commit/76075d6)) | ||
* **ts:** Fix type definition ([#154](https://github.com/zemirco/json2csv/issues/154)) ([fae53a1](https://github.com/zemirco/json2csv/commit/fae53a1)) | ||
## 3.6.3 / 2016-08-17 | ||
@@ -2,0 +17,0 @@ |
declare namespace json2csv { | ||
interface IField { | ||
interface FieldValueCallback<T> { | ||
(row: T, field: string, data: string): string; | ||
} | ||
interface FieldBase { | ||
label?: string; | ||
value: string; | ||
default?: string; | ||
} | ||
interface IOptions { | ||
data: any[]; | ||
fields?: (string | IField)[]; | ||
filedNames?: string[]; | ||
interface Field extends FieldBase { | ||
value: string; | ||
} | ||
interface CallbackField<T> extends FieldBase { | ||
value: FieldValueCallback<T>; | ||
} | ||
interface Options<T> { | ||
data: T[]; | ||
fields?: (string | Field | CallbackField<T>)[]; | ||
fieldNames?: string[]; | ||
del?: string; | ||
@@ -25,10 +36,12 @@ defaultValue?: string; | ||
interface ICallback { | ||
interface Callback { | ||
(error: Error, csv: string): void; | ||
} | ||
export function json2csv(options: IOptions, callback: ICallback): void; | ||
export function json2csv(options: IOptions): string; | ||
} | ||
export = json2csv.json2csv; | ||
declare function json2csv<T>(options: json2csv.Options<T>, callback: json2csv.Callback): void; | ||
declare function json2csv<T>(options: json2csv.Options<T>): string; | ||
declare function json2csv(options: json2csv.Options<{ [key: string]: string; }>, callback: json2csv.Callback): void; | ||
declare function json2csv(options: json2csv.Options<{ [key: string]: string; }>): string; | ||
export = json2csv; |
@@ -14,3 +14,3 @@ /** | ||
* @name Json2CsvParams | ||
* @type {Object} | ||
* @typedef {Object} | ||
* @property {Array} data - array of JSON objects | ||
@@ -17,0 +17,0 @@ * @property {Array} [fields] - see documentation for details |
{ | ||
"name": "json2csv", | ||
"preferGlobal": "true", | ||
"version": "3.7.2", | ||
"version": "3.7.4", | ||
"description": "Convert JSON to CSV", | ||
@@ -33,3 +33,5 @@ "keywords": [ | ||
"deploy:docs": "docpress b && git-update-ghpages zemirco/json2csv _docpress", | ||
"prepublish": "in-publish && npm test && npm run build && npm run deploy:docs || not-in-publish" | ||
"prepublish": "in-publish && npm run before:publish || not-in-publish", | ||
"before:publish": "npm test && npm run build && npm run deploy:docs && npm run release", | ||
"release": "standard-version" | ||
}, | ||
@@ -55,2 +57,3 @@ "dependencies": { | ||
"istanbul": "^0.4.3", | ||
"standard-version": "^4.0.0", | ||
"tap-spec": "^4.1.0", | ||
@@ -57,0 +60,0 @@ "tape": "^4.0.0", |
Sorry, the diff of this file is too big to display
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
284581
6997
10
1