Skip to content
Permalink
Browse files

chore: docs regen & format

Signed-off-by: Charlike Mike Reagent <opensource@tunnckocore.com>
  • Loading branch information
tunnckoCore committed Mar 16, 2020
1 parent dd7ead4 commit 6dcaecb905eb1c310a30a31e0ad0c59160b39c7c
@@ -248,7 +248,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/babel-preset&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/browserslist-config&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/eslint-config&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/prettier-config&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/renovate-config&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/@tunnckocore/typescript-config&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -61,6 +61,7 @@ from [GitHub Actions](https://github.com/features/actions) with
## Table of Contents

- [Install](#install)
- [API](#api)
- [Contributing](#contributing)
- [Guides and Community](#guides-and-community)
- [Support the project](#support-the-project)
@@ -82,7 +83,11 @@ think to contribute to this project._
$ yarn add all-module-paths
```

() => include(process.cwd() + '/.verb.md')
## API

<!-- docks-start -->

<!-- docks-end -->

**[back to top](#readme)**

@@ -226,7 +231,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/all-module-paths&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -285,7 +285,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->
[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/arr-includes&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -285,7 +285,7 @@ License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->
[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/babel-preset-optimise&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -229,7 +229,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->

[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/gitclone-cli&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -314,7 +314,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->
[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/gitclone-defaults&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -511,7 +511,7 @@ Released under the [MPL-2.0 License][license-url].
[codestyle-img]: https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb&cache=300
[linuxbuild-url]: https://github.com/tunnckocore/opensource/actions
[linuxbuild-img]: https://badgen-net.charlike.now.sh/github/checks/tunnckoCore/opensource/master/test?cache=300&label=build&icon=github
[linuxbuild-img]: https://badgen.net/github/checks/tunnckoCore/opensource/master?cache=300&label=build&icon=github
[ccommits-url]: https://conventionalcommits.org/
[ccommits-img]: https://badgen.net/badge/conventional%20commits/v1.0.0/green?cache=300
@@ -561,7 +561,7 @@ Released under the [MPL-2.0 License][license-url].
<!-- [patreon-img]: https://badgen.net/badge/Patreon/tunnckoCore/F96854?icon=patreon -->
[patreon-sponsor-img]: https://badgen.net/badge/become/a%20sponsor/F96854?icon=patreon
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://github.com/tunnckoCore/opensource/tree/master&via=tunnckoCore
[twitter-share-url]: https://twitter.com/intent/tweet?text=https://ghub.now.sh/glob-cache&via=tunnckoCore
[twitter-share-img]: https://badgen.net/badge/twitter/share/1da1f2?icon=twitter
[open-issue-url]: https://github.com/tunnckoCore/opensource/issues/new
[tunnckocore_legal]: https://badgen.net/https/liam-badge-daknys6gadky.runkit.sh/com/legal/tunnckocore?label&color=A56016&icon=https://svgshare.com/i/Dt6.svg
@@ -1,8 +1,7 @@


# ip-filter [![npm version][npmv-img]][npmv-url] [![License][license-img]][license-url] [![Libera Manifesto][libera-manifesto-img]][libera-manifesto-url]

> Validates valid IPs (IPv4 and IPv6) using [micromatch][] - glob patterns, RegExp, string or array of globs. If match returns the IP, otherwise null.
> Validates valid IPs (IPv4 and IPv6) using [micromatch][] - glob patterns,
> RegExp, string or array of globs. If match returns the IP, otherwise null.
Please consider following this project's author,
[Charlike Mike Reagent](https://github.com/tunnckoCore), and :star: the project
@@ -62,20 +61,20 @@ from [GitHub Actions](https://github.com/features/actions) with

- [Install](#install)
- [API](#api)
* [ipFilter](#ipfilter)
- [ipFilter](#ipfilter)
- [See Also](#see-also)
- [Contributing](#contributing)
* [Guides and Community](#guides-and-community)
* [Support the project](#support-the-project)
- [Guides and Community](#guides-and-community)
- [Support the project](#support-the-project)
- [Contributors](#contributors)
- [License](#license)

_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
_(TOC generated by [verb](https://github.com/verbose/verb) using
[markdown-toc](https://github.com/jonschlinkert/markdown-toc))_

## Install

This project requires [**Node.js**](https://nodejs.org) **>=10.13**
_(see
This project requires [**Node.js**](https://nodejs.org) **>=10.13** _(see
[Support & Release Policy](https://github.com/tunnckoCoreLabs/support-release-policy))_.
Install it using [**yarn**](https://yarnpkg.com) or
[**npm**](https://npmjs.com).<br> _We highly recommend to use Yarn when you
@@ -93,8 +92,8 @@ _Generated using [jest-runner-docs](https://ghub.now.sh/jest-runner-docs)._

### [ipFilter](./src/index.js#L44)

Filter `ip` against glob `patterns`, using [micromatch][] under the hood,
so `options` are passed to it.
Filter `ip` against glob `patterns`, using [micromatch][] under the hood, so
`options` are passed to it.

<span id="ipfilter-signature"></span>

@@ -109,10 +108,12 @@ function(ip, patterns, options)
#### Params
- `ip` **{string}** - Accepts only valid IPs by default
- `patterns` **{string|array}** - Basically everything that [micromatch][]'s second argument can accept.
- `options` **{object}** - Pass `strict: false` if want to validate non-ip values,
options are also passed to [micromatch][].
- `returns` **{string}** - a `string` or `null` If not match returns `null`, otherwise the passed `ip` as string.
- `patterns` **{string|array}** - Basically everything that [micromatch][]'s
second argument can accept.
- `options` **{object}** - Pass `strict: false` if want to validate non-ip
values, options are also passed to [micromatch][].
- `returns` **{string}** - a `string` or `null` If not match returns `null`,
otherwise the passed `ip` as string.
<span id="ipfilter-examples"></span>
@@ -158,14 +159,31 @@ console.log(res); // => 'x-koa.foo'
Some of these projects are used here or were inspiration for this one, others
are just related. So, thanks for your existance!
- [ip-regex](https://www.npmjs.com/package/ip-regex): Regular expression for matching IP addresses (IPv4 & IPv6) | [homepage](https://github.com/sindresorhus/ip-regex#readme "Regular expression for matching IP addresses (IPv4 & IPv6)")
- [is-match-ip](https://www.npmjs.com/package/is-match-ip): Matching IPs using [micromatch][] and [ip-filter][] - glob patterns, RegExp… [more](https://github.com/tunnckocore/is-match-ip#readme) | [homepage](https://github.com/tunnckocore/is-match-ip#readme "Matching IPs using [micromatch][] and [ip-filter][] - glob patterns, RegExp, string or array of globs. Returns matcher function.")
- [is-match](https://www.npmjs.com/package/is-match): Create a matching function from a glob pattern, regex, string… [more](https://github.com/jonschlinkert/is-match) | [homepage](https://github.com/jonschlinkert/is-match "Create a matching function from a glob pattern, regex, string, array, object or function.")
- [koa-ip-filter](https://www.npmjs.com/package/koa-ip-filter): Middleware for [koa][] that filters IPs against glob patterns, RegExp… [more](https://github.com/tunnckocore/koa-ip-filter#readme) | [homepage](https://github.com/tunnckocore/koa-ip-filter#readme "Middleware for [koa][] that filters IPs against glob patterns, RegExp, string or array of globs. Support custom `403 Forbidden` message and custom ID.")
- [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A replacement and faster alternative to… [more](https://github.com/micromatch/micromatch) | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.")
- [to-file-path](https://www.npmjs.com/package/to-file-path): Create a filepath from an object path (dot notation), list… [more](https://github.com/tunnckocore/to-file-path#readme) | [homepage](https://github.com/tunnckocore/to-file-path#readme "Create a filepath from an object path (dot notation), list of arguments, array, number or Arguments object.")
- [ip-regex](https://www.npmjs.com/package/ip-regex): Regular expression for
matching IP addresses (IPv4 & IPv6) |
[homepage](https://github.com/sindresorhus/ip-regex#readme 'Regular expression for matching IP addresses (IPv4 & IPv6)')
- [is-match-ip](https://www.npmjs.com/package/is-match-ip): Matching IPs using
[micromatch][] and [ip-filter][] - glob patterns, RegExp
[more](https://github.com/tunnckocore/is-match-ip#readme) |
[homepage](https://github.com/tunnckocore/is-match-ip#readme 'Matching IPs using [micromatch][] and [ip-filter][] - glob patterns, RegExp, string or array of globs. Returns matcher function.')
- [is-match](https://www.npmjs.com/package/is-match): Create a matching function
from a glob pattern, regex, string
[more](https://github.com/jonschlinkert/is-match) |
[homepage](https://github.com/jonschlinkert/is-match 'Create a matching function from a glob pattern, regex, string, array, object or function.')
- [koa-ip-filter](https://www.npmjs.com/package/koa-ip-filter): Middleware for
[koa][] that filters IPs against glob patterns, RegExp
[more](https://github.com/tunnckocore/koa-ip-filter#readme) |
[homepage](https://github.com/tunnckocore/koa-ip-filter#readme 'Middleware for [koa][] that filters IPs against glob patterns, RegExp, string or array of globs. Support custom `403 Forbidden` message and custom ID.')
- [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for
javascript/node.js. A replacement and faster alternative to
[more](https://github.com/micromatch/micromatch) |
[homepage](https://github.com/micromatch/micromatch 'Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.')
- [to-file-path](https://www.npmjs.com/package/to-file-path): Create a filepath
from an object path (dot notation), list
[more](https://github.com/tunnckocore/to-file-path#readme) |
[homepage](https://github.com/tunnckocore/to-file-path#readme 'Create a filepath from an object path (dot notation), list of arguments, array, number or Arguments object.')
**[back to top](#readme)**
**[back to top](#readme)**
## Contributing
@@ -224,10 +242,9 @@ your [support](#support-the-project) to them:
## License
Copyright (c) 2015-present,
[Charlike Mike Reagent](https://tunnckocore.com) `<opensource@tunnckocore.com>`
& [contributors](#wonderful-contributors).<br> Released under the
[MPL-2.0 License][license-url].
Copyright (c) 2015-present, [Charlike Mike Reagent](https://tunnckocore.com)
`<opensource@tunnckocore.com>` & [contributors](#wonderful-contributors).<br>
Released under the [MPL-2.0 License][license-url].
<!-- badges -->
@@ -321,4 +338,4 @@ Copyright (c) 2015-present,
[ip-filter]: https://github.com/tunnckocore/ip-filter
[is-match]: https://github.com/jonschlinkert/is-match
[koa]: https://github.com/koajs/koa
[micromatch]: https://github.com/micromatch/micromatch
[micromatch]: https://github.com/micromatch/micromatch

0 comments on commit 6dcaecb

Please sign in to comment.
You can’t perform that action at this time.