1.0.1 • Published 5 years ago

@dlorian/ts-factory v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

ts-factory

Build Status SonarCloud (.io)

ts-factory is just a simple factory used to create some kind of times series mock data.

Install

If you want to install it you can use npm for this

npm install @dlorian/ts-factory

Usage

const tsFactory = require("@dlorian/ts-factory");

const tsOptions = {
  start: "2018-01-01",
  end: "2019-01-01"
};

const tsStream = tsFactory.stream(tsOptions);

tsStream.pipe(process.stdout);

Options

OptionDescExpected inputRequired
startWanted start date of times seriesdate string in format 'yyyy-mm-dd'yes
endWanted end date of times seriesdate string in format 'yyyy-mm-dd'yes
granulartiyGranularity of the output time series'daily', 'hourly', 'quarter_hourly'no, default 'hourly'
formatWanted output format of the time series'json', 'xml', 'csv'no, default 'json'