Skip to content

Commit

Permalink
chore: bump to version 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
b13nxx committed Jan 30, 2019
1 parent d2acfc5 commit 34fb863
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
20 changes: 17 additions & 3 deletions API.md
Expand Up @@ -8,6 +8,7 @@ Cure for being paranoia about parameters which are coming in every single wrong
* [.includes(param, contain, [condition])](#module_Paramoia.includes) ⇒ <code>Boolean</code>
* [.equals(param, types)](#module_Paramoia.equals) ⇒ <code>Boolean</code>
* [.valid(param, whitelist)](#module_Paramoia.valid) ⇒ <code>Boolean</code>
* [.invalid(param, blacklist)](#module_Paramoia.invalid) ⇒ <code>Boolean</code>
* [.has(param, key)](#module_Paramoia.has) ⇒ <code>Boolean</code>
* [.values(param, types)](#module_Paramoia.values) ⇒ <code>Boolean</code>
* [.empty(param)](#module_Paramoia.empty) ⇒ <code>Boolean</code>
Expand All @@ -28,7 +29,7 @@ It checks if **param** includes **contain** or not.
| --- | --- | --- | --- |
| param | <code>Array.&lt;String&gt;</code> \| <code>Object.&lt;String, \*&gt;</code> | | Parameter which will be checked. |
| contain | <code>Array.&lt;String&gt;</code> \| <code>Object.&lt;String, \*&gt;</code> | | Parameter which will be checked against. |
| [condition] | <code>Number</code> | <code>Paramoia.Include.Must</code> | Parameter which indicates check condition: `Only`: **param** *can include less* than **contain** but different. `Must`: **param** *must include* **contain**. `MustOnly`: **param** *must only include* **contain**. You should use [Paramoia.Include.*](#module_Paramoia.Include) |
| [condition] | <code>Number</code> | <code>Paramoia.Include.Must</code> | Parameter which indicates check condition: `Only`: **param** *can include less* than **contain** but different. `Must`: **param** *must include* **contain**. `MustOnly`: **param** *must only include* **contain**. You should use one of [Paramoia.Include.*](#module_Paramoia.Include) |

<a name="module_Paramoia.equals"></a>

Expand All @@ -53,8 +54,21 @@ It checks if **param** is one of **whitelist** or not.

| Param | Type | Description |
| --- | --- | --- |
| param | <code>Number</code> \| <code>String</code> | Parameter which will be checked. |
| whitelist | <code>Array.&lt;(Number\|String)&gt;</code> | Parameter which will be checked against. |
| param | <code>\*</code> | Parameter which will be checked. |
| whitelist | <code>Array.&lt;\*&gt;</code> | Parameter which will be checked against. |

<a name="module_Paramoia.invalid"></a>

### Paramoia.invalid(param, blacklist) ⇒ <code>Boolean</code>
It checks if **param** is not one of **blacklist** or it is.

**Kind**: static method of [<code>Paramoia</code>](#module_Paramoia)
**Returns**: <code>Boolean</code> - Result of check.- `TRUE`: **param** IS NOT one of **blacklist**.- `FALSE`: **param** IS one of **blacklist**.

| Param | Type | Description |
| --- | --- | --- |
| param | <code>\*</code> | Parameter which will be checked. |
| blacklist | <code>Array.&lt;\*&gt;</code> | Parameter which will be checked against. |

<a name="module_Paramoia.has"></a>

Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,10 @@
# 0.3.1 (2019-01-30)

- docs: fix typo in api documentation ([d2acfc5](https://github.com/b8kkyn/paramoia/commit/d2acfc5))
- feat: add invalid function ([711c8dd](https://github.com/b8kkyn/paramoia/commit/711c8dd))
- docs: fix documentation of valid function ([4070a88](https://github.com/b8kkyn/paramoia/commit/4070a88))
- fix: add missing default value for condition parameter of includes function ([d6abe68](https://github.com/b8kkyn/paramoia/commit/d6abe68))

# 0.2.1 (2019-01-27)

- fix: add default return value to includes, has and empty functions ([f00e56d](https://github.com/b8kkyn/paramoia/commit/f00e56d))
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "paramoia",
"version": "0.2.1",
"version": "0.3.1",
"description": "Cure for being paranoia about parameters which are coming in every single wrong way to our functions.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 34fb863

Please sign in to comment.