1.0.5 • Published 6 days ago

@teamteanpm2024/quam-tempora-quas v1.0.5

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

@teamteanpm2024/quam-tempora-quas Version Badge

github actions coverage License Downloads

npm badge

Set a function’s name.

Arguments:

  • fn: the function
  • name: the new name
  • loose: Optional. If true, and the name fails to be set, do not throw. Default false.

Returns fn.

Usage

var setFunctionName = require('@teamteanpm2024/quam-tempora-quas');
var assert = require('assert');

const obj = {
    concise() {},
    arrow: () => {},
    named: function named() {},
    anon: function () {},
};
assert.equal(obj.concise.name, 'concise');
assert.equal(obj.arrow.name, 'arrow');
assert.equal(obj.named.name, 'named');
assert.equal(obj.anon.name, 'anon');

assert.equal(setFunctionName(obj.concise, 'brief'), obj.concise);
assert.equal(setFunctionName(obj.arrow, 'pointy'), obj.arrow);
assert.equal(setFunctionName(obj.named, ''), obj.named);
assert.equal(setFunctionName(obj.anon, 'anonymous'), obj.anon);

assert.equal(obj.concise.name, 'brief');
assert.equal(obj.arrow.name, 'pointy');
assert.equal(obj.named.name, '');
assert.equal(obj.anon.name, 'anonymous');
dominvariantcollection.es6Object.fromEntrieseslintconsoleutilityclassnamenegativeJSONwatchingwafcreatecloudwatchframeworkwgetcloudtrailfastcloneaccessorsequence@@toStringTagtoSortedreact animationmulti-packagefilterconfigurableprotocss nestingES2017deepcopyUint32Arraycharacterses5writestyleguideIteratorUint16ArrayString.prototype.matchAllkeynativemkdirpjasminedatemoveurlless.jstypesenvBigUint64ArrayasyncCSSStyleDeclaration__proto__asciiutilitiesrobustObservablefastcopyreadableconcatMapmimemacosinternal slotprotocol-buffersdotenverror-handlingbrowserslisttyped arrayES2020redactphonegenericstacitcontainshandlersthroatgetPrototypeOfttybcryptdeepReactiveXArray.prototype.findLastIndeximmutablenested cssArrayBuffer#slicebufferECMAScript 2015json-schemamapreduceauthcsskinesisqueueequalitycommandreuseESnextspinnersgetOwnPropertyDescriptorcommand-linehasOwnqueueMicrotaskkeyshttpobjencryptionchromiumthrottleES2019libphonenumbersymbolsmergeelectronmatchesauthenticationquerycallAsyncIteratorconcatkarmamkdirmrustylingreact poseisfullECMAScript 2019streams2parentsassertsnegative zero256argsregexpdatastructurefpspersistentwordbreakECMAScript 2016readserializees-abstracttoolsArray.prototype.filternpmlanguagefastsqslimitbindpropertykoreanchromejQueryless mixinsquerystringArray.prototype.containsdom-testing-libraryconfigoptionbootstrap csssidesettingsbyteLengthArray.prototype.flatawesomesaucefantasy-landWebSocketsreduxlrupnpm9toobjectserializationshebangArray3drgbpolyfillsnsxtermoffsetpackage managernodeObject.keysES2016sameValueZeromake dirsortparsecss lesscall-bindcryptovalidatorRegExp#flagsweaksettypedarraysfscjkargumentworkerObject.assignstringtoStringTagforEachinstallglobautoscalingswfrm -freast-asian-widthsharedimmerreducerObject.getPrototypeOfpruneframerHyBisafeownloggerfunctionaljsonschematrimLeftpipeviewgesturestddoptimizerstringifierprivate datagradients cssreduceextensionarktypesuperstructentriesmkdirspopmotion$.extendrapidwatchFilecolorspecastmobilethreetelephoneECMAScript 3Array.prototype.includestoolkituninstallupjsonpathes8artargvlinkInt16Arrayendpointa11ypropertiesterminalObservablessymlinkdataviewcensorinputarrayresolveratearraysquotewarningaccessibilityduplexstreamenumerableUint8ClampedArraynodejssharedarraybuffernumberflagjoiinternalgetterwrapmime-dbmonorepotypedarrayUint8ArrayES7YAMLpositiveanimationfast-deep-copyTypeScriptfastifyprototypecolumnargparsedependency managerlinttc39JSON-SchemaobjectlockfilepropwatchconsumedeterministicfindLastmapformfseventshookssyntaxerrorscheme-validationcode pointsUnderscorecharacterjsxagentboundsanitizebreakes2017minimaltraverseshrinkwrapcorsflattenregularpicomatchArrayBuffersetImmediateeventEmitterautoprefixerruntimeebscopypuredeep-copyfast-clonepromisesdefinesesserializervisualmodulesdiffesspringjestcheckdataViewsymlinksharmonyfunctionsdatawaapijapanesetestercollectionpackagechannelsomermefficientprotobuflistenerseslint-pluginglacierdescriptorcallbindcallboundless compilermatchtaskpathfind-upWeakSetform-validationES2023mixinsBigInt64ArrayInt8ArrayMicrosoftutilpreprocessorECMAScript 2018interruptswordwrappyyamlrandombrowserpluginbluebirdlessiamRFC-6455testingvariablesrequestURLoperating-systemratelimitlinuxes-shim APIchinesecss variablewebcompile lessperformancecallback[[Prototype]]idleeverytapeexit-codedebuggerdeepclonefile systemES3react-hooksassertFloat64Arraydirectorydynamodbworkspace:*findupObject.valuescall-boundcloudsearchinferencenopesigtermArray.prototype.findLastsignalsamazoncore-jsclonepasswordMapsymbolwidthdeep-cloneparsingmomenttranspilerTypeBoxtrimStartcolorsl10narraybufferremoveString.prototype.trimflatemrfindLastIndexdragES2022statusReactiveExtensionses7installergroupinapitslibajaxcircularmetadatatoArraycolourextendsetPrototypeOfprogressFunction.prototype.namefast-deep-clonelimitedio-tspreserve-symlinkscommanderFloat32Arrayansimiddlewareuser-streamseslintplugintakeweakmapstringifybuffersrfc4122omitvariables in csspromiseramdalastpushformsnamesfull-widthhasOwnPropertyES2018textbannerqssortedequalexitECMAScript 7optimistshimajvObject.definePropertybrowserlistStreamsloadingbatchconnectregular expressionsECMAScript 2023inspectbootstrap lessslicedependencieshasWeakMapless csssettypescript0compareutil.inspectreact-testing-libraryloggingpackage.jsonclass-validatorspeedstructuredClonepackagescloudformationwindowsstylestreamsuuideventsjwtPushawaitvpcbundlertypeerrorbalancedregular expressionrecursiveestreecoerciblegradients css3RxJSescapetestemitredux-toolkitxsscurriedstarterincludesbundlingloadbalancingtapchaiimportexportsuperagentposelengthES8sham-0valuegetpoint-freegetoptdropObjectfast-copyReflect.getPrototypeOfschemeexecelbdescriptionrequireworkflowtypedcliCSSjsdomdebugiterationclassesroute53constvartimepostcsscolumnsbusymimetypescodesECMAScript 2021lookArrayBuffer.prototype.sliceperformantlook-upsigintreact-hook-formstoragegatewaysimpledbjsdiffrmdirSetproxybeanstalkts.envWebSocketponyfillbabel-coreSymbolfunctiontrimRightisConcatSpreadableeslintconfigshellcloudfrontreadablestreamArray.prototype.flattenrdsTypedArrayArray.prototype.flatMapslotES2015helpersenderavalesscssECMAScript 2022es2015babelfpstylesheetcomputed-typeswhichES2021nameiteratorsettervalidategdpres-shimsparserflatMaptypesafefetchstylesawsstablehttpslazycss-in-jswalkconcurrency
1.0.5

6 days ago

1.0.4

7 days ago

1.0.3

8 days ago

1.0.2

9 days ago

1.0.1

10 days ago

1.0.0

10 days ago