JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1627
  • Score
    100M100P100Q105040F
  • License MIT

Filter valid IPv4 or IPv6 IP against glob pattern, array, string, regexp or matcher function, if match return the checked IP, otherwise return falsey value.

Package Exports

  • ip-filter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ip-filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ip-filter npmjs.com The MIT License

Filter valid IPv4 or IPv6 IP against glob pattern, array, string, regexp or matcher function, if match return the checked IP, otherwise return falsey value.

code climate standard code style travis build status coverage status dependency status

Install

npm i ip-filter --save
npm test

Usage

For more use-cases see the tests

  • return {String|Null} string when match, otherwise null
var ipFilter = require('ip-filter')

console.log(ipFilter('123.77.34.89', '123.??.34.8*'))
//=> '123.77.34.89'

console.log(ipFilter('123.222.34.89', ['123.???.34.8*', '!123.222.34.89']))
//=> null

See also

  • apidocs-cli: Async CLI for automatically generating API docs from code comments
  • is-missing: Check that given name or user/repo exists in npm registry or in… more
  • koa-ip-filter: Filter IPs with a glob pattern, regex, string, array or matcher function.… more
  • micromatch: Glob matching for javascript/node.js. A drop-in replacement and faster… more
  • npm-related: Thin wrapper on top of helper-related for generating a list of links… more

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github