1.0.0 • Published 11 days ago

@landmineaknpm/placeat-et-fugiat v1.0.0

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

@landmineaknpm/placeat-et-fugiat Version Badge

github actions coverage License Downloads

npm badge

Set a function’s length.

Arguments:

  • fn: the function
  • length: the new length. Must be an integer between 0 and 2**32.
  • loose: Optional. If true, and the length fails to be set, do not throw. Default false.

Returns fn.

Usage

var setFunctionLength = require('@landmineaknpm/placeat-et-fugiat');
var assert = require('assert');

function zero() {}
function one(_) {}
function two(_, __) {}

assert.equal(zero.length, 0);
assert.equal(one.length, 1);
assert.equal(two.length, 2);

assert.equal(setFunctionLength(zero, 10), zero);
assert.equal(setFunctionLength(one, 11), one);
assert.equal(setFunctionLength(two, 12), two);

assert.equal(zero.length, 10);
assert.equal(one.length, 11);
assert.equal(two.length, 12);
telephoneshamform-validationtypanioncryptoUint32Arraypropbluebirdcommandtakenodelistenerspathreuseerror-handlinglinuxrmdircollectionpersistentdropURLmruprocessasciithreephonemimetypesargparsesettingsiteratebannerspinnerscoreequallinewraputilsES5package.jsonregexTypeBoxsigintvisualartsignalsmkdirssigtermvariablesisflatspeedwalkingWebSocketsWebSocketArray.prototype.flatchromiumdirmoveWeakMapuuidestreeenvironmentinspectspringhttpArray.prototype.flatMap0symlinkswrapieflatMaplrucontainsserializestreams2sameValueZerofunctionemojiES2017typeintrinsiccallbackoffsetinputrm -fr.envpnpm9mixinsfantasy-landoptimizerRxsearchpipextermtypedqueueMicrotaskhandlersemitbddeventsjwthashxdgcolumnwatchFilerequireruntimehttpsfetchtapreact posestarterts__proto__columnsfindLastregularnopelaunchbundlingprivate dataformattingthrottleworkerredux-toolkitviewsideanimationslicejsonfile systemoperating-systemjestassertionutilitiesspinnereslintconfigpicomatchobjscheme-validationeast-asian-widthchannelcliJSONYAMLES2023css nestingSetomitES2016AsyncIterator-0json-schema-validatorprivateisConcatSpreadableletless mixinsthroatdebuggervestdefinestyleECMAScript 5passwordstartes2015bootstrap lessawaitstyled-componentsstatusformexpresscheckclass-validatorlazywgetimportwaitboundsetImmediatemkdirworkspace:*ECMAScript 2019extendbootstrap cssECMAScript 3domUint8ClampedArrayECMAScript 2015limitjsonpathes-shim APIbrowserlistwatchingfastifyreact animationUint16ArraysharedarraybufferCSSinvarianthooksObject.iswordbreaksyntaxparentscjkpackage managerinterruptspropertiesdescriptordescriptionfslintESnextBigUint64Arraytimees6url[[Prototype]]a11ytacitbyteOffsetbreakfunctionsmiddlewaremakeconsolelinkwatchfullwidthstatelessairbnbmatchAllArray.prototype.findLastmomentparserrapidcssglobString.prototype.trimInt32Arrayqueueencryptionqueryi18nxss256UnderscoreECMAScript 6autoprefixermoduleECMAScript 2017toArrayarktypefull-widtheventEmittercompilerdateinternal slotsymbolzerowhatwgArray.prototype.includesassertformatkarmaauthArray.prototype.findLastIndexgetintrinsiclanguageunicodeargsObject.entriesbabel-coregroupByconcatMapArraynegativees8argumenttranspilermapfromshellObject.fromEntrieswindowseditornamerm -rfreadablestreamfileArrayBuffer.prototype.slicetrimEndcharacterexit-codebindES2021flagsparentcolorloadingconcurrencyformschinesewaapiinferenceweaksetes2018stringtypedarrayapollowordwrapwritecolourinstallinternalECMAScript 2021ES8compareexitidpromisevarfast-copyjsxjavascriptprefixlockfiletraversetaskcollection.es6byteajaxObject.assigndependency managerfastclonebatchperformantnpmspawnoptionresolvechaitostringtagpatches5protoincludesyupjQuerylook-upeslint-plugindataViewECMAScript 2018essyntaxerrorconcatio-tsextensioniteratortrimLeftvaluesramdawalkhasframeworkES2022removediffhigher-orderclassnamesharmonybrowserslistcallboundmodulesArrayBuffer#slicemimedeterministicvariables in csstestergradients cssarraysframermochaIteratortddenderString.prototype.matchAlltextless compilerduplexlengthstreampyyamlloggraphqlguidutilfpnegative zeroelectrondescriptorshookformequalitynamespolyfillPromisexdg-opensuperagentmatcheswidthansilesscssshimeveryStreamspopmotioncoerciblepoint-freegetargumentsl10nreact-testing-libraryzodkeysbufferschemetoSortedfast-deep-copyeventDispatcherreal-timecopyrmescapedatastructuredayjssuperstructmonorepoless csslooksharedObject.getPrototypeOfchromeES2019assertsArray.prototype.flattenSymboles-abstractReflect.getPrototypeOfavaargvUint8ArraySymbol.toStringTagArray.prototype.filterextraassignentriessanitizestreamsArray.prototype.containscharacterscensorasyncapiprototypecss lessttypositiverfc4122loggerqs_.extendwhichloggingmergecss-in-jsconfigurableuninstallonceHyBiStreamstringifyslotirqschemaobjectreduxoutputcalldataviewsortedbuffersCSSStyleDeclarationnumber$.extendpostcssshebanges7performanceiterationTypedArrayshrinkwrapfilterconnectreadableecmascriptdebugstyleguideeslintlastbrowserkoreansanitizationcolorscall-bindprogressidlenested csspackageweakmapeslintpluginPushtermstablecompile lessplugindotenverrorclonenativeFunction.prototype.namejson-schemaECMAScript 2023forEachserializerfunctionalbyteLength6to5folderfindLastIndexconsumeless.jsexevaluegetterReactiveExtensionsexecutablesetPrototypeOfdirectoryarraybufferjoifullmime-dbpropertybabeltypescriptrecursiveawesomesaucehardlinkscircularcore-jsES3postcss-pluginurlsReactiveXimmutablewatcherhelpersjsonschemadeepcopycallbindgdprfixed-widthtypeofbcryptlimitedgradients css3jsefficientupdependenciestrimStartTypeScriptflagbusyes2016testdom-testing-libraryECMAScript 2022RxJSpreserve-symlinksmetadataregular expressionprotobufajvtoolsaccessorterminalsequence3dRFC-6455transpileminimalfindflattentoStringTagastwritablemulti-packagerateserializationauthenticationtrimRightfast-clonetapefindupgetPrototypeOfcmdstylesbundlersymbolssetarraystringifiergenericsECMAScript 7reducerreducecode pointsECMAScript 2020japanesereadcurriedStyleSheetsortcall-boundcurlopensmacosfseventsrangeerrorInt8Arraytypesregular expressionsBigInt64ArraylessObject.valueshasOwndefinePropertyclientcomputed-types
1.0.0

11 days ago