1.1.8 • Published 2 years ago

recipe-search-parser v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago