Comparing version 0.0.0 to 1.0.0
## 1.0.0 - 2015-05-24 | ||
- Release v1.0.0 / npm@v1.0.0 | ||
- add support for no strict mode | ||
- run npm-related(1) | ||
- run keywords(1) | ||
- Commits on May 23, 2015 | ||
- add test for when invalid ip | ||
- implement | ||
## 0.0.0 - 2015-05-23 | ||
- first commits | ||
- first commits |
@@ -13,4 +13,4 @@ /*! | ||
module.exports = function ipFilter (ip, patterns) { | ||
if (!ipRegex().test(ip)) { | ||
module.exports = function ipFilter (ip, patterns, strict) { | ||
if (!strict && !ipRegex().test(ip)) { | ||
throw new Error('ip-filter expect only valid IPv4/IPv6 IPs') | ||
@@ -17,0 +17,0 @@ } |
{ | ||
"name": "ip-filter", | ||
"version": "0.0.0", | ||
"version": "1.0.0", | ||
"description": "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.", | ||
@@ -13,4 +13,4 @@ "repository": "tunnckoCore/ip-filter", | ||
"dependencies": { | ||
"ip-regex": "^1.0.3", | ||
"is-match": "^0.2.0" | ||
"ip-regex": "~1.0.3", | ||
"is-match": "~0.2.0" | ||
}, | ||
@@ -20,3 +20,21 @@ "devDependencies": { | ||
}, | ||
"keywords": [] | ||
"keywords": [ | ||
"array", | ||
"check", | ||
"filter", | ||
"glob", | ||
"ip", | ||
"ips", | ||
"ipv", | ||
"ismatch", | ||
"match", | ||
"matcher", | ||
"micro", | ||
"micromatch", | ||
"patterns", | ||
"regexp", | ||
"string", | ||
"valid", | ||
"validate" | ||
] | ||
} |
@@ -31,2 +31,10 @@ # ip-filter [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] | ||
## See also | ||
- [apidocs-cli](https://github.com/tunnckocore/apidocs-cli): Async CLI for automatically generating API docs from code comments | ||
- [is-missing](https://github.com/tunnckoCore/is-missing): Check that given `name` or `user/repo` exists in npm registry or in… [more](https://github.com/tunnckoCore/is-missing) | ||
- [koa-ip-filter](https://github.com/tunnckocore/koa-ip-filter): Filter IPs with a glob pattern, regex, string, array or matcher function.… [more](https://github.com/tunnckocore/koa-ip-filter) | ||
- [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster… [more](https://github.com/jonschlinkert/micromatch) | ||
- [npm-related](https://github.com/tunnckoCore/npm-related): Thin wrapper on top of `helper-related` for generating a list of links… [more](https://github.com/tunnckoCore/npm-related) | ||
## Contributing | ||
@@ -33,0 +41,0 @@ |
@@ -41,2 +41,10 @@ /*! | ||
}) | ||
test('should support no strict mode to compare other than IPs', function (done) { | ||
var actual = ipFilter('x-koaip', ['*-koaip', '!foo-koa'], true) | ||
var expected = 'x-koaip' | ||
test.equal(actual, expected) | ||
done() | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10788
57
1
93
Updatedip-regex@~1.0.3
Updatedis-match@~0.2.0