Home Reference Source Test Repository

buildDocs/applicators/PartialApplicator.js

import { Applicator } from './Applicator';
import { resolveFunction } from '../utils';
export class PartialApplicator extends Applicator {
    apply({ args, target, config: { execute } }) {
        return function (...invokeArgs) {
            return execute(resolveFunction(args[0], this, target), ...args.slice(1)).apply(this, invokeArgs);
        };
    }
}