1.0.0 • Published 1 year ago

@ffras4vnpm/laudantium-maxime-earum v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@ffras4vnpm/laudantium-maxime-earum Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Robustly .call.bind() a function.

Getting started

npm install --save @ffras4vnpm/laudantium-maxime-earum

Usage/Examples

const assert = require('assert');
const callBind = require('@ffras4vnpm/laudantium-maxime-earum');
const callBound = require('@ffras4vnpm/laudantium-maxime-earum/callBound');

function f(a, b) {
	assert.equal(this, 1);
	assert.equal(a, 2);
	assert.equal(b, 3);
	assert.equal(arguments.length, 2);
}

const fBound = callBind(f);

const slice = callBound('Array.prototype.slice');

delete Function.prototype.call;
delete Function.prototype.bind;

fBound(1, 2, 3);

assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);

Tests

Clone the repo, npm install, and run npm test

descriptorscodesfindenvassertsbyteLengthString.prototype.matchAllguidgradients css3transpilercolumnssettingsconnectidleCSSStyleDeclarationpositive256linkassigndom-testing-librarywordwrapiegetPrototypeOfuninstallponyfillECMAScript 2017css nestingcall-bindclientwarningES2017flatObject.entriespackageconcatMaplengthchaifullcommandhashECMAScript 2015call-boundredactnpmclassnamesequalprocessECMAScript 2020writeauthenticationspeedanimationrfc4122dayjsbrowserlistlazyreact posetrimenderRFC-6455signalsArrayBuffer#slicecollection.es6hardlinksregular expressioncontainssuperstructWeakSetworkerconsole$.extendcolourcorsRegExp.prototype.flagswaapiboundpipeapolloBigInt64ArraytouchcliutilitydiffsettermatchESReflect.getPrototypeOfratelimitstylingdropES2022nested cssnativepropertiesUint8ArrayInt8ArraykoreanbytedragconcurrencymimejsdombatchcompareArray.prototype.flattencoercibleajveverytextcssObservableentriesparentfullwidthsequencedupleximportparsermulti-packagekeysiteratefileregexptslibreact-testing-libraryprotobuffast-deep-cloneviewexit-codepyyamleslintreducepuredeepeast-asian-widthfastclonepromiseconfigurablehasrequestSymbol.toStringTagtostringtageslintconfigencryptiones2018ECMAScript 2023hookspackage.jsonstdlibfindLastIndextypanionrangeerrorES5intrinsictypeerrorMapsymbolio-tstypesafejasmineaccessor-0streamdotenvconsumeArray.prototype.findLastIndexES2019StyleSheetawesomesauceObject.istraversenumbercore-jsfastifytoolstrimEndvalidationlook-upObject.assignBigUint64ArraysymlinkstoSortedPromisestyleincludesString.prototype.trimreuseasciiURLSearchParamsstableprogressjsoneslintpluginECMAScript 5termtoobjectbufferes-shim APIform-validationisConcatSpreadableinterruptsArray.prototype.findLastreadablebluebirdvalidtrimStartmakewalkECMAScript 6ES3debuggerlockfilecachecomputed-typesTypedArray
1.0.0

1 year ago