Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pbojinov/request-ip
/ functions
Functions
9 in github.com/pbojinov/request-ip
⨍
Functions
9
◇
Types & classes
0
↓ 4 callers
Function
not
* Helper function which reverses the sense of predicate result * @param {*} func * @returns
src/is.js:15
↓ 3 callers
Function
mw
* Expose request IP as a middleware. * * @param {object} [options] - Configuration. * @param {string} [options.attributeName] - Name of attribute t
src/index.js:174
↓ 1 callers
Function
existy
* 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 callers
Function
getClientIp
* 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 callers
Function
getClientIpFromXForwardedFor
* 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
Function
ServerFactory
* 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
Function
ip
* 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
Function
object
* 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
Function
string
* 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