curl2node

0.0.5 • Public • Published

curl2node

This is tool for converting curl bash command to Node.JS code.

Table of contents

Installation

yarn global add curl2node

Usage

curl2node generator curl https://google.com 

If you would like to test if it will work first, feel free to use runner instead of generator.

curl2node runner curl https://google.com 

Generated code will look something like this:

const got = require("got");

const options = {
	"url": "https://google.com"
};

got(options).then((data) => {
	console.log(data);
}).catch((error) => {
	console.error(error);
});

Author

Readme

Keywords

none

Package Sidebar

Install

npm i curl2node

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

4.46 kB

Total Files

19

Last publish

Collaborators

  • nemanjan00