MCPcopy Create free account

hub / github.com/pbojinov/request-ip / functions

Functions9 in github.com/pbojinov/request-ip

↓ 4 callersFunctionnot
* Helper function which reverses the sense of predicate result * @param {*} func * @returns
src/is.js:15
↓ 3 callersFunctionmw
* Expose request IP as a middleware. * * @param {object} [options] - Configuration. * @param {string} [options.attributeName] - Name of attribute t
src/index.js:174
↓ 1 callersFunctionexisty
* Replaces is.existy from is_js. * @param {*} value - The value to test * @returns {boolean} True if the value is defined, otherwise false
src/is.js:26
↓ 1 callersFunctiongetClientIp
* Determine client IP address. * * @param req * @returns {string} ip - The IP address if known, defaulting to empty string if unknown.
src/index.js:55
↓ 1 callersFunctiongetClientIpFromXForwardedFor
* Parse x-forwarded-for headers. * * @param {string} value - The value to be parsed. * @return {string|null} First known IP address, if any.
src/index.js:9
FunctionServerFactory
* Create a new server for each test so we can easily close it after the test is done. * This prevents tests from hanging and competing against closin
test/index.js:21
Functionip
* Replaces is.ip from is_js. * @param {*} value - The value to test * @returns {boolean} True if the value is an IP address, otherwise false
src/is.js:35
Functionobject
* Replaces is.object from is_js. * @param {*} value - The value to test * @returns {boolean} True if the value is an object, otherwise false
src/is.js:46
Functionstring
* Replaces is,.string from is_js. * @param {*} value - The value to test * @returns True if the value is a string, otherwise false
src/is.js:55