Home

function: overEvery


overEvery(predicates: Array.): function

Creates a function that checks if **all** of the `predicates` return truthy when invoked with the arguments it receives.

Example(s):

const func = overEvery([Boolean, isFinite])

func('1')
// => true

func(null)
// => false

func(NaN)
// => false

Params:

Name Type Attribute Description
predicates The predicates to check.

Returns:

function

  {
    "comment": "/**\r\n * Creates a function that checks if **all** of the `predicates` return\r\n * truthy when invoked with the arguments it receives.\r\n *\r\n * @since 4.0.0\r\n * @category Util\r\n * @param {Function[]} [predicates=[identity]]\r\n *  The predicates to check.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * const func = overEvery([Boolean, isFinite])\r\n *\r\n * func('1')\r\n * // => true\r\n *\r\n * func(null)\r\n * // => false\r\n *\r\n * func(NaN)\r\n * // => false\r\n */",
    "meta": {
        "range": [
            528,
            673
        ],
        "filename": "overEvery.js",
        "lineno": 25,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100006680",
            "name": "overEvery",
            "type": "FunctionDeclaration",
            "paramnames": [
                "iteratees"
            ]
        },
        "vars": {
            "": null
        }
    },
    "description": "Creates a function that checks if **all** of the `predicates` return\rtruthy when invoked with the arguments it receives.",
    "since": "4.0.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Util",
            "value": "Util"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "Array."
                ]
            },
            "optional": true,
            "defaultvalue": "[identity]",
            "description": "The predicates to check.",
            "name": "predicates"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "function"
                ]
            },
            "description": "Returns the new function."
        }
    ],
    "examples": [
        "const func = overEvery([Boolean, isFinite])\r\rfunc('1')\r// => true\r\rfunc(null)\r// => false\r\rfunc(NaN)\r// => false"
    ],
    "name": "overEvery",
    "longname": "overEvery",
    "kind": "function",
    "scope": "global",
    "___id": "T000002R000622",
    "___s": true,
    "filepath": "overEvery.js"
}