Skip to content

Commit 36bd5eb

Browse files
committed
adding url from cli
1 parent 157b735 commit 36bd5eb

File tree

203 files changed

+17919
-407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+17919
-407
lines changed

cli/apiToCsv.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
const getApiResponse = require('../src/getApiResponse');
22
const convertToCsv = require('../src/convertToCsv');
3+
const {argv} = require('yargs');
34

45
(async () => {
5-
const API_ENDPOINT = 'https://jsonplaceholder.typicode.com/posts'
6+
// console.log(process.argv[2])
7+
// const API_ENDPOINT = 'https://jsonplaceholder.typicode.com/posts'
68

7-
const apiData = await getApiResponse(API_ENDPOINT);
9+
const apiData = await getApiResponse(argv.url);
810

9-
await convertToCsv(apiData);
11+
await convertToCsv(apiData, "sample-ouput");
1012

1113
})();

node_modules/@types/color-name/LICENSE

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/color-name/README.md

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/color-name/index.d.ts

Lines changed: 161 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/color-name/package.json

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/ansi-regex/index.d.ts

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/ansi-regex/index.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/ansi-regex/license

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)