1.1.8 • Published 8 months ago

recipe-search-parser v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Installation

npm install recipe-search-parser
yarn add recipe-search-parser

Usage

import SearchParser from "recipe-search-parser";

const searchParser = new SearchParser();

Stringify

searchParser.stringify({ query, category, include, exclude })

// Return: cake-with-cholocate-categoria-sweet-con-sugar-flour-senza-salt

### Parse
<p>The <code>searchParser.parse(data)</code> takes one parameter <code>URL</code>. The string is then parsed and formatted into query, category, include and exclude. </p>

```javascript
const URL = "cake-with-cholocate-categoria-sweet-con-sugar-flour-senza-salt"

searchParser.parse(URL)

// Return: {
// query: "cake with chocolate",
// category: "sweet",
// include: ["sugar", "flour"],
// exclude: ["salt"]

Contribute

You are welcome to contribute!

Licence

MIT

1.1.8

8 months ago

1.1.7

8 months ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago