Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13f3f7b2f6 | |||
| 94f2620161 | |||
| bdebb3308c | |||
| cb5ac7618b | |||
| 00aed79e18 | |||
| 438053a2f9 | |||
| 7479328e13 | |||
| 56d7ae8952 | |||
| feb41df3e2 | |||
| 1474cb1665 | |||
| 6e289a01b1 | |||
| c08aa1959f | |||
| 0dd0d31f41 | |||
| ee1f5036aa | |||
| 987cb9593e | |||
| d6ff7c54e2 | |||
| 8ac99dd0e5 | |||
| 8ec05e355d | |||
| 7fd9c7e895 | |||
| 2ee19d9ff6 | |||
| ddb8c5c77d | |||
| bfa20f38bd | |||
| 3f52942987 | |||
| 788572370a |
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,6 +1,22 @@
|
|||||||
.nogit/
|
.nogit/
|
||||||
node_modules/
|
|
||||||
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
.yarn/
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_web/
|
||||||
|
dist_serve/
|
||||||
|
dist_ts_web/
|
||||||
|
|
||||||
|
# custom
|
||||||
@@ -3,7 +3,7 @@ image: hosttoday/ht-docker-node:npmci
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .yarn/
|
- .npmci_cache/
|
||||||
key: "$CI_BUILD_STAGE"
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
@@ -26,8 +26,9 @@ mirror:
|
|||||||
snyk:
|
snyk:
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci command yarn global add snyk
|
- npmci npm prepare
|
||||||
- npmci command yarn install --ignore-scripts
|
- npmci command npm install -g snyk
|
||||||
|
- npmci command npm install --ignore-scripts
|
||||||
- npmci command snyk test
|
- npmci command snyk test
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@@ -36,21 +37,11 @@ snyk:
|
|||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# test stage
|
||||||
# ====================
|
# ====================
|
||||||
testLEGACY:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci node install legacy
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install lts
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@@ -62,6 +53,7 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@@ -117,8 +109,10 @@ pages:
|
|||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmci
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command yarn global add npmpage
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
- npmci command npmpage
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command tsdoc
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
@@ -128,3 +122,4 @@ pages:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
allow_failure: true
|
||||||
|
|||||||
4
.snyk
Normal file
4
.snyk
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||||
|
version: v1.12.0
|
||||||
|
ignore: {}
|
||||||
|
patch: {}
|
||||||
16
dist/index.d.ts
vendored
16
dist/index.d.ts
vendored
@@ -1,16 +0,0 @@
|
|||||||
export interface ICsvConstructorOptions {
|
|
||||||
headers: boolean;
|
|
||||||
}
|
|
||||||
export declare class Csv {
|
|
||||||
static createCsvFromString(csvStringArg: string, options: ICsvConstructorOptions): Promise<Csv>;
|
|
||||||
csvString: string;
|
|
||||||
headers: string[];
|
|
||||||
keyFrame: string;
|
|
||||||
options: ICsvConstructorOptions;
|
|
||||||
determineKeyframe(): void;
|
|
||||||
serializeCsvString(): any[];
|
|
||||||
getRows(): string[];
|
|
||||||
getHeaders(): string[];
|
|
||||||
createDataObject(dataArray: string[]): any;
|
|
||||||
exportAsObject(): Promise<any>;
|
|
||||||
}
|
|
||||||
88
dist/index.js
vendored
88
dist/index.js
vendored
@@ -1,88 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
class Csv {
|
|
||||||
constructor() {
|
|
||||||
this.keyFrame = null;
|
|
||||||
this.options = {
|
|
||||||
headers: true
|
|
||||||
};
|
|
||||||
}
|
|
||||||
static createCsvFromString(csvStringArg, options) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const csvInstance = new Csv();
|
|
||||||
csvInstance.csvString = csvStringArg;
|
|
||||||
csvInstance.determineKeyframe();
|
|
||||||
return csvInstance;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
determineKeyframe() {
|
|
||||||
let commaLength = 0;
|
|
||||||
let semicolonLength = 0;
|
|
||||||
const commaRegexResult = this.csvString.match(/,/g);
|
|
||||||
const semicolonRegexResult = this.csvString.match(/;/g);
|
|
||||||
if (commaRegexResult) {
|
|
||||||
commaLength = commaRegexResult.length;
|
|
||||||
}
|
|
||||||
if (semicolonRegexResult) {
|
|
||||||
semicolonLength = semicolonRegexResult.length;
|
|
||||||
}
|
|
||||||
// tslint:disable-next-line:prefer-conditional-expression
|
|
||||||
if (commaLength < semicolonLength) {
|
|
||||||
this.keyFrame = ';';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.keyFrame = ',';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
serializeCsvString() {
|
|
||||||
const rowArray = this.getRows();
|
|
||||||
const resultArray = [];
|
|
||||||
if (this.options.headers) {
|
|
||||||
this.getHeaders();
|
|
||||||
rowArray.shift();
|
|
||||||
}
|
|
||||||
for (const row of rowArray) {
|
|
||||||
resultArray.push(row.split(this.keyFrame));
|
|
||||||
}
|
|
||||||
return resultArray;
|
|
||||||
}
|
|
||||||
getRows() {
|
|
||||||
return this.csvString.split('\n');
|
|
||||||
}
|
|
||||||
getHeaders() {
|
|
||||||
const rowArray = this.getRows();
|
|
||||||
if (this.options.headers) {
|
|
||||||
let headerRow = rowArray[0];
|
|
||||||
this.headers = headerRow.split(this.keyFrame);
|
|
||||||
}
|
|
||||||
return this.headers;
|
|
||||||
}
|
|
||||||
createDataObject(dataArray) {
|
|
||||||
const neededIterations = dataArray.length;
|
|
||||||
let resultJson = {};
|
|
||||||
for (let i = 0; i < neededIterations; i++) {
|
|
||||||
resultJson[this.headers[i]] = dataArray[i];
|
|
||||||
}
|
|
||||||
return resultJson;
|
|
||||||
}
|
|
||||||
exportAsObject() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const serializedData = this.serializeCsvString();
|
|
||||||
const dataObjects = [];
|
|
||||||
for (const dataArray of serializedData) {
|
|
||||||
dataObjects.push(this.createDataObject(dataArray));
|
|
||||||
}
|
|
||||||
return dataObjects;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.Csv = Csv;
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBTUE7SUFBQTtRQVlTLGFBQVEsR0FBVyxJQUFJLENBQUM7UUFFeEIsWUFBTyxHQUEyQjtZQUN2QyxPQUFPLEVBQUUsSUFBSTtTQUNkLENBQUM7SUFnRUosQ0FBQztJQS9FUSxNQUFNLENBQU8sbUJBQW1CLENBQ3JDLFlBQW9CLEVBQ3BCLE9BQStCOztZQUUvQixNQUFNLFdBQVcsR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFDO1lBQzlCLFdBQVcsQ0FBQyxTQUFTLEdBQUcsWUFBWSxDQUFDO1lBQ3JDLFdBQVcsQ0FBQyxpQkFBaUIsRUFBRSxDQUFDO1lBQ2hDLE9BQU8sV0FBVyxDQUFDO1FBQ3JCLENBQUM7S0FBQTtJQVNNLGlCQUFpQjtRQUN0QixJQUFJLFdBQVcsR0FBRyxDQUFDLENBQUM7UUFDcEIsSUFBSSxlQUFlLEdBQUcsQ0FBQyxDQUFDO1FBQ3hCLE1BQU0sZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDcEQsTUFBTSxvQkFBb0IsR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUN4RCxJQUFJLGdCQUFnQixFQUFFO1lBQ3BCLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUM7U0FDdkM7UUFDRCxJQUFJLG9CQUFvQixFQUFFO1lBQ3hCLGVBQWUsR0FBRyxvQkFBb0IsQ0FBQyxNQUFNLENBQUM7U0FDL0M7UUFDRCx5REFBeUQ7UUFDekQsSUFBSSxXQUFXLEdBQUcsZUFBZSxFQUFFO1lBQ2pDLElBQUksQ0FBQyxRQUFRLEdBQUcsR0FBRyxDQUFDO1NBQ3JCO2FBQU07WUFDTCxJQUFJLENBQUMsUUFBUSxHQUFHLEdBQUcsQ0FBQztTQUNyQjtJQUNILENBQUM7SUFFTSxrQkFBa0I7UUFDdkIsTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2hDLE1BQU0sV0FBVyxHQUFHLEVBQUUsQ0FBQztRQUN2QixJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFO1lBQ3hCLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztZQUNsQixRQUFRLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDbEI7UUFDRCxLQUFLLE1BQU0sR0FBRyxJQUFJLFFBQVEsRUFBRTtZQUMxQixXQUFXLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7U0FDNUM7UUFDRCxPQUFPLFdBQVcsQ0FBQztJQUNyQixDQUFDO0lBRU0sT0FBTztRQUNaLE9BQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDcEMsQ0FBQztJQUVNLFVBQVU7UUFDZixNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUM7UUFDaEMsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLE9BQU8sRUFBRTtZQUN4QixJQUFJLFNBQVMsR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDNUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxTQUFTLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQztTQUMvQztRQUNELE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztJQUN0QixDQUFDO0lBRU0sZ0JBQWdCLENBQUMsU0FBbUI7UUFDekMsTUFBTSxnQkFBZ0IsR0FBRyxTQUFTLENBQUMsTUFBTSxDQUFDO1FBQzFDLElBQUksVUFBVSxHQUFRLEVBQUUsQ0FBQztRQUN6QixLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsZ0JBQWdCLEVBQUUsQ0FBQyxFQUFFLEVBQUU7WUFDekMsVUFBVSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDNUM7UUFDRCxPQUFPLFVBQVUsQ0FBQztJQUNwQixDQUFDO0lBRVksY0FBYzs7WUFDekIsTUFBTSxjQUFjLEdBQUcsSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7WUFDakQsTUFBTSxXQUFXLEdBQUcsRUFBRSxDQUFDO1lBQ3ZCLEtBQUssTUFBTSxTQUFTLElBQUksY0FBYyxFQUFFO2dCQUN0QyxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO2FBQ3BEO1lBQ0QsT0FBTyxXQUFXLENBQUM7UUFDckIsQ0FBQztLQUFBO0NBQ0Y7QUFoRkQsa0JBZ0ZDIn0=
|
|
||||||
2
dist/smartcsv.plugins.d.ts
vendored
2
dist/smartcsv.plugins.d.ts
vendored
@@ -1,2 +0,0 @@
|
|||||||
import * as smartq from 'smartq';
|
|
||||||
export { smartq };
|
|
||||||
5
dist/smartcsv.plugins.js
vendored
5
dist/smartcsv.plugins.js
vendored
@@ -1,5 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const smartq = require("smartq");
|
|
||||||
exports.smartq = smartq;
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRjc3YucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0Y3N2LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpQ0FBaUM7QUFFeEIsd0JBQU0ifQ==
|
|
||||||
@@ -1,8 +1,16 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [
|
"npmGlobalTools": [],
|
||||||
"@gitzone/npmts",
|
"npmAccessLevel": "public"
|
||||||
"ts-node"
|
},
|
||||||
]
|
"gitzone": {
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "pushrocks",
|
||||||
|
"gitrepo": "smartcsv",
|
||||||
|
"shortDescription": "handle csv data | gitzone standard compliant",
|
||||||
|
"npmPackagename": "@pushrocks/smartcsv",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1481
package-lock.json
generated
Normal file
1481
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -1,20 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartcsv",
|
"name": "@pushrocks/smartcsv",
|
||||||
"version": "1.0.4",
|
"version": "1.0.16",
|
||||||
"description": "handle csv data",
|
"private": false,
|
||||||
|
"description": "handle csv data | gitzone standard compliant",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(ts-node -O '{\"lib\": [ \"es2015\" ]}' test/test.ts)",
|
"test": "(tstest test/)",
|
||||||
|
"build": "(tsbuild)",
|
||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"smartfile": "^4.2.28",
|
"@gitzone/tsbuild": "^2.1.11",
|
||||||
"tapbundle": "^2.0.0"
|
"@gitzone/tsrun": "^1.2.6",
|
||||||
|
"@gitzone/tstest": "^1.0.21",
|
||||||
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
|
"@pushrocks/tapbundle": "^3.0.9",
|
||||||
|
"@types/node": "^12.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"smartq": "^1.1.8"
|
"@pushrocks/smartpromise": "^3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
26
readme.md
Normal file
26
readme.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# @pushrocks/smartcsv
|
||||||
|
handle csv data | gitzone standard compliant
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartcsv)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartcsv)
|
||||||
|
* [github.com (source mirror)](https://github.com/pushrocks/smartcsv)
|
||||||
|
* [docs (typedoc)](https://pushrocks.gitlab.io/smartcsv/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://gitlab.com/pushrocks/smartcsv/commits/master)
|
||||||
|
[](https://gitlab.com/pushrocks/smartcsv/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/@pushrocks/smartcsv)
|
||||||
|
[](https://snyk.io/test/npm/@pushrocks/smartcsv)
|
||||||
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[](https://prettier.io/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://maintainedby.lossless.com)
|
||||||
12
test/test.ts
12
test/test.ts
@@ -1,9 +1,9 @@
|
|||||||
// tslint:disable-next-line:no-implicit-dependencies
|
// tslint:disable-next-line:no-implicit-dependencies
|
||||||
import { expect, tap } from 'tapbundle';
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import * as smartcsv from '../ts/index';
|
import * as smartcsv from '../ts/index';
|
||||||
|
|
||||||
// tslint:disable-next-line:no-implicit-dependencies
|
// tslint:disable-next-line:no-implicit-dependencies
|
||||||
import * as smartfile from 'smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
|
|
||||||
let fileString: string;
|
let fileString: string;
|
||||||
let testCsv: smartcsv.Csv;
|
let testCsv: smartcsv.Csv;
|
||||||
@@ -18,4 +18,12 @@ tap.test('should create a valid csv', async () => {
|
|||||||
console.log(result);
|
console.log(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tap.test('should create a valid csv string', async () => {
|
||||||
|
const createdCsvString = await smartcsv.Csv.createCsvStringFromArray([
|
||||||
|
{ wow: 'hi', wow2: 'there' },
|
||||||
|
{ wow: 'really', wow3: 'yes' }
|
||||||
|
]);
|
||||||
|
console.log(createdCsvString);
|
||||||
|
});
|
||||||
|
|
||||||
tap.start();
|
tap.start();
|
||||||
|
|||||||
62
ts/index.ts
62
ts/index.ts
@@ -5,15 +5,49 @@ export interface ICsvConstructorOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Csv {
|
export class Csv {
|
||||||
|
// STATIC
|
||||||
|
|
||||||
|
/**
|
||||||
|
* creates a Csv Object from string
|
||||||
|
* @param csvStringArg
|
||||||
|
* @param optionsArg
|
||||||
|
*/
|
||||||
public static async createCsvFromString(
|
public static async createCsvFromString(
|
||||||
csvStringArg: string,
|
csvStringArg: string,
|
||||||
options: ICsvConstructorOptions
|
optionsArg: ICsvConstructorOptions
|
||||||
): Promise<Csv> {
|
): Promise<Csv> {
|
||||||
const csvInstance = new Csv();
|
const csvInstance = new Csv(csvStringArg, optionsArg);
|
||||||
csvInstance.csvString = csvStringArg;
|
|
||||||
csvInstance.determineKeyframe();
|
|
||||||
return csvInstance;
|
return csvInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async createCsvStringFromArray(arrayArg: any[]): Promise<string> {
|
||||||
|
const foundKeys: string[] = [];
|
||||||
|
|
||||||
|
// lets deal with the keys
|
||||||
|
for (const objectArg of arrayArg) {
|
||||||
|
for (const key of Object.keys(objectArg)) {
|
||||||
|
foundKeys.includes(key) ? null : foundKeys.push(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// lets deal with the data
|
||||||
|
const dataRows: string[] = [];
|
||||||
|
for (const objectArg of arrayArg) {
|
||||||
|
const dataRowArray: string[] = [];
|
||||||
|
for (const key of foundKeys) {
|
||||||
|
dataRowArray.push(objectArg[key]);
|
||||||
|
}
|
||||||
|
dataRows.push(dataRowArray.join(','));
|
||||||
|
}
|
||||||
|
|
||||||
|
// lets put togehter the csv string and return it
|
||||||
|
const headerString = foundKeys.join(',');
|
||||||
|
const dataString = dataRows.join('\n');
|
||||||
|
const csvString = `${headerString}\n${dataString}\n`;
|
||||||
|
return csvString;
|
||||||
|
}
|
||||||
|
|
||||||
|
// INSTANCE
|
||||||
public csvString: string;
|
public csvString: string;
|
||||||
public headers: string[];
|
public headers: string[];
|
||||||
public keyFrame: string = null;
|
public keyFrame: string = null;
|
||||||
@@ -22,6 +56,15 @@ export class Csv {
|
|||||||
headers: true
|
headers: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
constructor(csvStringArg: string, optionsArg: ICsvConstructorOptions) {
|
||||||
|
this.csvString = csvStringArg;
|
||||||
|
this.options = optionsArg;
|
||||||
|
this.determineKeyframe();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* determines the keyframe of the csv string
|
||||||
|
*/
|
||||||
public determineKeyframe() {
|
public determineKeyframe() {
|
||||||
let commaLength = 0;
|
let commaLength = 0;
|
||||||
let semicolonLength = 0;
|
let semicolonLength = 0;
|
||||||
@@ -41,6 +84,9 @@ export class Csv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* serializes the csv string
|
||||||
|
*/
|
||||||
public serializeCsvString() {
|
public serializeCsvString() {
|
||||||
const rowArray = this.getRows();
|
const rowArray = this.getRows();
|
||||||
const resultArray = [];
|
const resultArray = [];
|
||||||
@@ -54,8 +100,12 @@ export class Csv {
|
|||||||
return resultArray;
|
return resultArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getRows() {
|
public getRows(): string[] {
|
||||||
return this.csvString.split('\n');
|
const rowsArray = this.csvString.split('\n');
|
||||||
|
if (rowsArray[rowsArray.length - 1] === '') {
|
||||||
|
rowsArray.pop();
|
||||||
|
}
|
||||||
|
return rowsArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getHeaders() {
|
public getHeaders() {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import * as smartq from 'smartq';
|
import * as smartq from '@pushrocks/smartpromise';
|
||||||
|
|
||||||
export { smartq };
|
export { smartq };
|
||||||
|
|||||||
20
tslint.json
20
tslint.json
@@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
"tslint:latest",
|
|
||||||
"tslint-config-prettier"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"semicolon": [
|
"semicolon": [true, "always"],
|
||||||
true,
|
"no-console": false,
|
||||||
"always"
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
|
}
|
||||||
|
|||||||
521
yarn.lock
521
yarn.lock
@@ -1,521 +0,0 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@types/chai-as-promised@^7.1.0":
|
|
||||||
version "7.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz#010b04cde78eacfb6e72bfddb3e58fe23c2e78b9"
|
|
||||||
dependencies:
|
|
||||||
"@types/chai" "*"
|
|
||||||
|
|
||||||
"@types/chai-string@^1.4.0":
|
|
||||||
version "1.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.4.1.tgz#3a9d22716c27f2759bf272a4dbbdb593f18399e3"
|
|
||||||
dependencies:
|
|
||||||
"@types/chai" "*"
|
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^4.1.2":
|
|
||||||
version "4.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.3.tgz#b8a74352977a23b604c01aa784f5b793443fb7dc"
|
|
||||||
|
|
||||||
"@types/fs-extra@5.0.0":
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413"
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/node@*":
|
|
||||||
version "10.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.6.tgz#c0bce8e539bf34c1b850c13ff46bead2fecc2e58"
|
|
||||||
|
|
||||||
"@types/vinyl@^2.0.2":
|
|
||||||
version "2.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.2.tgz#4f3b8dae8f5828d3800ef709b0cff488ee852de3"
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
ansi-256-colors@^1.1.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
|
||||||
|
|
||||||
argparse@^1.0.7:
|
|
||||||
version "1.0.10"
|
|
||||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
|
||||||
dependencies:
|
|
||||||
sprintf-js "~1.0.2"
|
|
||||||
|
|
||||||
assertion-error@^1.0.1:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
|
|
||||||
|
|
||||||
balanced-match@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
|
||||||
|
|
||||||
beautycolor@^1.0.7:
|
|
||||||
version "1.0.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
|
|
||||||
dependencies:
|
|
||||||
ansi-256-colors "^1.1.0"
|
|
||||||
typings-global "^1.0.14"
|
|
||||||
|
|
||||||
bindings@^1.2.1:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
|
||||||
version "1.1.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
|
||||||
dependencies:
|
|
||||||
balanced-match "^1.0.0"
|
|
||||||
concat-map "0.0.1"
|
|
||||||
|
|
||||||
chai-as-promised@^7.1.1:
|
|
||||||
version "7.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0"
|
|
||||||
dependencies:
|
|
||||||
check-error "^1.0.2"
|
|
||||||
|
|
||||||
chai-string@^1.4.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
|
||||||
|
|
||||||
chai@^4.1.2:
|
|
||||||
version "4.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
|
|
||||||
dependencies:
|
|
||||||
assertion-error "^1.0.1"
|
|
||||||
check-error "^1.0.1"
|
|
||||||
deep-eql "^3.0.0"
|
|
||||||
get-func-name "^2.0.0"
|
|
||||||
pathval "^1.0.0"
|
|
||||||
type-detect "^4.0.0"
|
|
||||||
|
|
||||||
check-error@^1.0.1, check-error@^1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
|
||||||
|
|
||||||
clone-buffer@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
|
|
||||||
|
|
||||||
clone-stats@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
|
|
||||||
|
|
||||||
clone@^2.1.1:
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"
|
|
||||||
|
|
||||||
cloneable-readable@^1.0.0:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65"
|
|
||||||
dependencies:
|
|
||||||
inherits "^2.0.1"
|
|
||||||
process-nextick-args "^2.0.0"
|
|
||||||
readable-stream "^2.3.5"
|
|
||||||
|
|
||||||
concat-map@0.0.1:
|
|
||||||
version "0.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
|
||||||
|
|
||||||
core-util-is@~1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
|
||||||
|
|
||||||
deep-eql@^3.0.0:
|
|
||||||
version "3.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
|
|
||||||
dependencies:
|
|
||||||
type-detect "^4.0.0"
|
|
||||||
|
|
||||||
define-properties@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
|
||||||
dependencies:
|
|
||||||
foreach "^2.0.5"
|
|
||||||
object-keys "^1.0.8"
|
|
||||||
|
|
||||||
early@^2.1.1:
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
|
||||||
dependencies:
|
|
||||||
beautycolor "^1.0.7"
|
|
||||||
smartq "^1.1.1"
|
|
||||||
typings-global "^1.0.16"
|
|
||||||
|
|
||||||
es-abstract@^1.5.1:
|
|
||||||
version "1.11.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681"
|
|
||||||
dependencies:
|
|
||||||
es-to-primitive "^1.1.1"
|
|
||||||
function-bind "^1.1.1"
|
|
||||||
has "^1.0.1"
|
|
||||||
is-callable "^1.1.3"
|
|
||||||
is-regex "^1.0.4"
|
|
||||||
|
|
||||||
es-to-primitive@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
|
||||||
dependencies:
|
|
||||||
is-callable "^1.1.1"
|
|
||||||
is-date-object "^1.0.1"
|
|
||||||
is-symbol "^1.0.1"
|
|
||||||
|
|
||||||
es6-error@^4.0.2:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
|
||||||
|
|
||||||
esprima@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
|
|
||||||
|
|
||||||
first-chunk-stream@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70"
|
|
||||||
dependencies:
|
|
||||||
readable-stream "^2.0.2"
|
|
||||||
|
|
||||||
foreach@^2.0.5:
|
|
||||||
version "2.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
|
||||||
|
|
||||||
fs-extra@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd"
|
|
||||||
dependencies:
|
|
||||||
graceful-fs "^4.1.2"
|
|
||||||
jsonfile "^4.0.0"
|
|
||||||
universalify "^0.1.0"
|
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
|
||||||
|
|
||||||
function-bind@^1.0.2, function-bind@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
|
||||||
|
|
||||||
get-func-name@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
|
|
||||||
|
|
||||||
glob@^7.1.2:
|
|
||||||
version "7.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
|
||||||
dependencies:
|
|
||||||
fs.realpath "^1.0.0"
|
|
||||||
inflight "^1.0.4"
|
|
||||||
inherits "2"
|
|
||||||
minimatch "^3.0.4"
|
|
||||||
once "^1.3.0"
|
|
||||||
path-is-absolute "^1.0.0"
|
|
||||||
|
|
||||||
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
|
|
||||||
version "4.1.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
|
||||||
|
|
||||||
has@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
|
||||||
dependencies:
|
|
||||||
function-bind "^1.0.2"
|
|
||||||
|
|
||||||
home@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/home/-/home-1.0.1.tgz#96a423ceb49b98378ff5ef3ceae059a557f9dd35"
|
|
||||||
dependencies:
|
|
||||||
os-homedir "^1.0.1"
|
|
||||||
|
|
||||||
inflight@^1.0.4:
|
|
||||||
version "1.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
|
||||||
dependencies:
|
|
||||||
once "^1.3.0"
|
|
||||||
wrappy "1"
|
|
||||||
|
|
||||||
inherits@2, inherits@^2.0.1, inherits@~2.0.3:
|
|
||||||
version "2.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
|
||||||
|
|
||||||
is-callable@^1.1.1, is-callable@^1.1.3:
|
|
||||||
version "1.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
|
||||||
|
|
||||||
is-date-object@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
|
||||||
|
|
||||||
is-regex@^1.0.4:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
|
||||||
dependencies:
|
|
||||||
has "^1.0.1"
|
|
||||||
|
|
||||||
is-symbol@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
|
||||||
|
|
||||||
is-utf8@^0.2.0, is-utf8@^0.2.1:
|
|
||||||
version "0.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
|
||||||
|
|
||||||
isarray@~1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
|
||||||
|
|
||||||
js-yaml@^3.10.0:
|
|
||||||
version "3.11.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
|
|
||||||
dependencies:
|
|
||||||
argparse "^1.0.7"
|
|
||||||
esprima "^4.0.0"
|
|
||||||
|
|
||||||
jsonfile@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
|
||||||
optionalDependencies:
|
|
||||||
graceful-fs "^4.1.6"
|
|
||||||
|
|
||||||
leakage@^0.3.0:
|
|
||||||
version "0.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
|
||||||
dependencies:
|
|
||||||
es6-error "^4.0.2"
|
|
||||||
left-pad "^1.1.3"
|
|
||||||
memwatch-next "^0.3.0"
|
|
||||||
minimist "^1.2.0"
|
|
||||||
pretty-bytes "^4.0.2"
|
|
||||||
|
|
||||||
left-pad@^1.1.3:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
|
|
||||||
|
|
||||||
memwatch-next@^0.3.0:
|
|
||||||
version "0.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
|
||||||
dependencies:
|
|
||||||
bindings "^1.2.1"
|
|
||||||
nan "^2.3.2"
|
|
||||||
|
|
||||||
minimatch@^3.0.4:
|
|
||||||
version "3.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
|
||||||
dependencies:
|
|
||||||
brace-expansion "^1.1.7"
|
|
||||||
|
|
||||||
minimist@^1.2.0:
|
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
|
||||||
|
|
||||||
nan@^2.3.2:
|
|
||||||
version "2.10.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
|
|
||||||
|
|
||||||
object-keys@^1.0.8:
|
|
||||||
version "1.0.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
|
||||||
|
|
||||||
object.getownpropertydescriptors@^2.0.3:
|
|
||||||
version "2.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
|
||||||
dependencies:
|
|
||||||
define-properties "^1.1.2"
|
|
||||||
es-abstract "^1.5.1"
|
|
||||||
|
|
||||||
once@^1.3.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
|
||||||
dependencies:
|
|
||||||
wrappy "1"
|
|
||||||
|
|
||||||
os-homedir@^1.0.1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
|
||||||
|
|
||||||
path-is-absolute@^1.0.0:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
|
||||||
|
|
||||||
pathval@^1.0.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
|
|
||||||
|
|
||||||
pify@^2.3.0:
|
|
||||||
version "2.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
|
||||||
|
|
||||||
pretty-bytes@^4.0.2:
|
|
||||||
version "4.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
|
||||||
|
|
||||||
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
|
|
||||||
|
|
||||||
readable-stream@^2.0.2, readable-stream@^2.3.5:
|
|
||||||
version "2.3.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
|
||||||
dependencies:
|
|
||||||
core-util-is "~1.0.0"
|
|
||||||
inherits "~2.0.3"
|
|
||||||
isarray "~1.0.0"
|
|
||||||
process-nextick-args "~2.0.0"
|
|
||||||
safe-buffer "~5.1.1"
|
|
||||||
string_decoder "~1.1.1"
|
|
||||||
util-deprecate "~1.0.1"
|
|
||||||
|
|
||||||
remove-trailing-separator@^1.0.1:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
|
|
||||||
|
|
||||||
replace-ext@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
|
||||||
|
|
||||||
require-reload@0.2.2:
|
|
||||||
version "0.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/require-reload/-/require-reload-0.2.2.tgz#29a7591846caf91b6e8a3cda991683f95f8d7d42"
|
|
||||||
|
|
||||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
|
||||||
version "5.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
|
||||||
|
|
||||||
smartchai@^2.0.0:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-2.0.1.tgz#d20f17221f0e3c6c3473600b78ddfba0ab0ea762"
|
|
||||||
dependencies:
|
|
||||||
"@types/chai" "^4.1.2"
|
|
||||||
"@types/chai-as-promised" "^7.1.0"
|
|
||||||
"@types/chai-string" "^1.4.0"
|
|
||||||
chai "^4.1.2"
|
|
||||||
chai-as-promised "^7.1.1"
|
|
||||||
chai-string "^1.4.0"
|
|
||||||
|
|
||||||
smartdelay@^1.0.3:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
|
||||||
dependencies:
|
|
||||||
smartq "^1.1.1"
|
|
||||||
typings-global "^1.0.16"
|
|
||||||
|
|
||||||
smartfile@^4.2.28:
|
|
||||||
version "4.2.28"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.2.28.tgz#ab089e0bad63dec5feddb5f3d1cd5d99b76da118"
|
|
||||||
dependencies:
|
|
||||||
"@types/fs-extra" "5.0.0"
|
|
||||||
"@types/vinyl" "^2.0.2"
|
|
||||||
fs-extra "^5.0.0"
|
|
||||||
glob "^7.1.2"
|
|
||||||
js-yaml "^3.10.0"
|
|
||||||
require-reload "0.2.2"
|
|
||||||
smartpath "^3.2.8"
|
|
||||||
smartq "^1.1.6"
|
|
||||||
smartrequest "^1.0.8"
|
|
||||||
vinyl-file "^3.0.0"
|
|
||||||
|
|
||||||
smartpath@^3.2.8:
|
|
||||||
version "3.2.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartpath/-/smartpath-3.2.8.tgz#4834bd3a8bae2295baacadba23c87a501952f940"
|
|
||||||
dependencies:
|
|
||||||
home "^1.0.1"
|
|
||||||
typings-global "^1.0.14"
|
|
||||||
|
|
||||||
smartq@^1.1.1, smartq@^1.1.6, smartq@^1.1.8:
|
|
||||||
version "1.1.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.8.tgz#7e2f3b9739eb5d6c9f45f2a86e339ec81e49e8d2"
|
|
||||||
dependencies:
|
|
||||||
util.promisify "^1.0.0"
|
|
||||||
|
|
||||||
smartrequest@^1.0.8:
|
|
||||||
version "1.0.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.8.tgz#9af18dde34efa7d43b4ecfc92ccb157a98eda3b1"
|
|
||||||
dependencies:
|
|
||||||
smartq "^1.1.1"
|
|
||||||
|
|
||||||
sprintf-js@~1.0.2:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
|
||||||
|
|
||||||
string_decoder@~1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
|
||||||
dependencies:
|
|
||||||
safe-buffer "~5.1.0"
|
|
||||||
|
|
||||||
strip-bom-buf@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572"
|
|
||||||
dependencies:
|
|
||||||
is-utf8 "^0.2.1"
|
|
||||||
|
|
||||||
strip-bom-stream@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca"
|
|
||||||
dependencies:
|
|
||||||
first-chunk-stream "^2.0.0"
|
|
||||||
strip-bom "^2.0.0"
|
|
||||||
|
|
||||||
strip-bom@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
|
|
||||||
dependencies:
|
|
||||||
is-utf8 "^0.2.0"
|
|
||||||
|
|
||||||
tapbundle@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-2.0.0.tgz#79fce68ff185c786fabaf6eb589a4afc7d2714b7"
|
|
||||||
dependencies:
|
|
||||||
early "^2.1.1"
|
|
||||||
leakage "^0.3.0"
|
|
||||||
smartchai "^2.0.0"
|
|
||||||
smartdelay "^1.0.3"
|
|
||||||
smartq "^1.1.1"
|
|
||||||
|
|
||||||
type-detect@^4.0.0:
|
|
||||||
version "4.0.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
|
|
||||||
|
|
||||||
typings-global@^1.0.14, typings-global@^1.0.16:
|
|
||||||
version "1.0.28"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.28.tgz#e28cc965476564cbc00e438739e0aa0735d323d4"
|
|
||||||
|
|
||||||
universalify@^0.1.0:
|
|
||||||
version "0.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
|
|
||||||
|
|
||||||
util-deprecate@~1.0.1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
|
||||||
|
|
||||||
util.promisify@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
|
||||||
dependencies:
|
|
||||||
define-properties "^1.1.2"
|
|
||||||
object.getownpropertydescriptors "^2.0.3"
|
|
||||||
|
|
||||||
vinyl-file@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365"
|
|
||||||
dependencies:
|
|
||||||
graceful-fs "^4.1.2"
|
|
||||||
pify "^2.3.0"
|
|
||||||
strip-bom-buf "^1.0.0"
|
|
||||||
strip-bom-stream "^2.0.0"
|
|
||||||
vinyl "^2.0.1"
|
|
||||||
|
|
||||||
vinyl@^2.0.1:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
|
|
||||||
dependencies:
|
|
||||||
clone "^2.1.1"
|
|
||||||
clone-buffer "^1.0.0"
|
|
||||||
clone-stats "^1.0.0"
|
|
||||||
cloneable-readable "^1.0.0"
|
|
||||||
remove-trailing-separator "^1.0.1"
|
|
||||||
replace-ext "^1.0.0"
|
|
||||||
|
|
||||||
wrappy@1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
|
||||||
Reference in New Issue
Block a user