mirror of
https://github.com/axios/axios.git
synced 2026-04-12 14:41:55 +08:00
- Add complete JSDoc block with parameter descriptions - Include return type and description - Improve code documentation for better developer experience - Follow established JSDoc patterns in the codebase
15 lines
444 B
JavaScript
15 lines
444 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Create a bound version of a function with a specified `this` context
|
|
*
|
|
* @param {Function} fn - The function to bind
|
|
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
*/
|
|
export default function bind(fn, thisArg) {
|
|
return function wrap() {
|
|
return fn.apply(thisArg, arguments);
|
|
};
|
|
}
|