You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
2.9 KiB

{"ast":null,"code":"import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\nfunction after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function () {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n}\nexport default after;","map":{"version":3,"names":["toInteger","FUNC_ERROR_TEXT","after","n","func","TypeError","apply","arguments"],"sources":["D:/vue/demo/node_modules/lodash-es/after.js"],"sourcesContent":["import toInteger from './toInteger.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\nfunction after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n\nexport default after;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,gBAAgB;;AAEtC;AACA,IAAIC,eAAe,GAAG,qBAAqB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,KAAKA,CAACC,CAAC,EAAEC,IAAI,EAAE;EACtB,IAAI,OAAOA,IAAI,IAAI,UAAU,EAAE;IAC7B,MAAM,IAAIC,SAAS,CAACJ,eAAe,CAAC;EACtC;EACAE,CAAC,GAAGH,SAAS,CAACG,CAAC,CAAC;EAChB,OAAO,YAAW;IAChB,IAAI,EAAEA,CAAC,GAAG,CAAC,EAAE;MACX,OAAOC,IAAI,CAACE,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC;IACpC;EACF,CAAC;AACH;AAEA,eAAeL,KAAK","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}