Skip to content

Commit

Permalink
update read me, version
Browse files Browse the repository at this point in the history
  • Loading branch information
marudhupandiyang committed Dec 1, 2017
1 parent b911c9f commit fd22bbb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# curl-parser-js
**Final javascript size is 2.58kB only!!**

Simple javascript library to parse `cUrl command` to `json object`. Regex based matching without adding any complex parser code/library. Can be used in `Node`, in any `frontend project` or as `standalone js file`.

With the generated json object you may construct your own `ajax` call using your `favourite` library.

## Usage

### Standalone

Add your script tag

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/parse-curl.js"></script>

Parse your cmd

const curlCmd = `curl 'http://server.com:5050/a/c/getName/?param1=pradeep&param2=kumar&param3=sharma'`;
parse_curl_js.parse(curlCmd);

Standalone Demo on [Codepen](https://codepen.io/marudhupandiyang/pen/jaXRYp?editors=0010)

### Node/frontend projects who support modules importing.

import Curlparser from 'curl-parser-js';
Expand Down Expand Up @@ -69,7 +83,6 @@
}
}


## Roadmap

1. Add plugins to generate request for different libraries.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "curl-parser-js",
"description": "Parse curl commands to json object",
"version": "0.0.2",
"version": "0.0.3",
"keywords": [
"parse-curl",
"curl",
Expand Down

0 comments on commit fd22bbb

Please sign in to comment.