1.0.0 • Published 14 days ago

@odczynflnpm/nihil-quam-libero v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

@odczynflnpm/nihil-quam-libero Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Robustly .call.bind() a function.

Getting started

npm install --save @odczynflnpm/nihil-quam-libero

Usage/Examples

const assert = require('assert');
const callBind = require('@odczynflnpm/nihil-quam-libero');
const callBound = require('@odczynflnpm/nihil-quam-libero/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

objcommand-linezodstarterprotostateeslint-pluginenumerabledirectoryless.jsinstallermergeBigUint64Arraylimitedlookviewjasminebuffersdropcall-bindBigInt64ArrayamazonsetPrototypeOfstablemoduleminimalpromisefigletbrowsertddtrimStartAsyncIteratores-shimsstylingasciifindupbcryptfetchawscontainsparentsReflect.getPrototypeOfworkspace:*apicloudsearchassertsenderagentdataViewfluxindicatorunicodelastcss lessnamewalkmrulintrgbArray.prototype.filterES2016Object.definePropertymkdirssafechromiumutilispreprocessortyped arrayESnextpredictablevpcartdayjstypepostcssUint8ClampedArraycorsponyfillsuperstructgetintrinsicSetstoragegatewaylinkpatchspinnerdeterministicmatchmkdirptoolkitlimitregulargetOwnPropertyDescriptorhttpcopydeep-copyURLSearchParamsArray.prototype.includeseslintclassnamesnopePromisedataRegExp.prototype.flagsauthwaitmonorepogetpropertiesbrowserlistURLhas-ownjschineserm -frthrottleextensioncheckObservable0a11yArray.prototype.containscryptopluginRxJSserializeprivatefileiamcolumnsReactiveExtensionsefficient__proto__nested cssworkflowpersistenteslintconfigdatevalidatestyleguidecore-jssidereadablestreamtoSortedcurlhigher-orderrequestresolvetypesfunctionsbyteOffsetchromerequireES6ES5prunecloudtrailclassesgraphqlless mixinsmakeES3picomatchnativetslibrmdirelectronES2023tc39ratelimitesvariables in cssprototyperedux-toolkithasOwnstreams2toobjectdescriptionec2utilityoptimizerwordwraputil.inspectcall-boundimmermime-dbregular expressionlazykinesisonceStreamsstyletimees6bannervestreactlanguageES2022mapstdlibfixed-widthgetoptnodeobjectWeakSetes5routingconsumecallhookscolorsslicehasOwnPropertyparentreducertakeconfigbytefastebswhatwgpackage.jsonairbnbCSSStyleDeclarationshamECMAScript 2019Symbol.toStringTagcallbounderroreast-asian-widthstringifierdefineECMAScript 6modulestypescriptWeakMapbindescapemovedomdataviewsettingsarraystructuredClone[[Prototype]]Int16ArrayUint32Arraybootstrap lesses8trimLeftrfc4122flagurlfast-deep-copyrmES2017typedarraynumbergroupeventEmitterajaxaccessorinferencemake dirconcatMapES2020someSymboliteratorfullwidthdirArray.prototype.findLastIndexansicryptboundstringfscollectioncjktapefile systemcreatesequenceconsolexhrhelpersdeepclonesetterflagsfind-upECMAScript 2015postcss-plugintypeofcharactermomentincludesloggingtouchspeediteratereact-hook-formmochaArray.prototype.flatMapfullroute53circulari18nequalweaksetcallbackwrapECMAScript 2022prefixtypanionterminalObject.getPrototypeOfshebangECMAScript 2017@@toStringTagfast-copywatchingmulti-packagesnsenvironmentreal-timerouteclass-validatorcommandhookformttysymbolsECMAScript 7parsedependenciesbundlinges-abstractRegExp#flagsmobileRFC-6455importformattingtypeerrorcloudformationomitweakmaptermkeysIterator
1.0.0

14 days ago