opusdev/vector-similarity-api
1
1'use strict';2 3/**4 * Create a bound version of a function with a specified `this` context5 *6 * @param {Function} fn - The function to bind7 * @param {*} thisArg - The value to be passed as the `this` parameter8 * @returns {Function} A new function that will call the original function with the specified `this` context9 */10export default function bind(fn, thisArg) {11 return function wrap() {12 return fn.apply(thisArg, arguments);13 };14}15 