2.1.4 • Published 10 days ago

@teamteanpm2024/possimus-dolores-maxime v2.1.4

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

@teamteanpm2024/possimus-dolores-maxime 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/possimus-dolores-maxime');
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');
command-linemodulestraverseutilssignalstreamsCSSschemeArray.prototype.flatcomputed-typesmatchesjses-shimsInt8Arrayeslintpluginarraysspinnersgetopteventsavaponyfilliteratevaluesflattencopyless cssbcryptwhatwghardlinksreact animationprivatefindLastscheme-validationvisualsequencea11yflatMapjson-schema-validatoranimationtextObject.entriestypedbatchruntimesortedjoinested cssdefinePropertySymbolzerofetchproxyvalidatorshamframeramazonbreakfullwidthmulti-packageflagssetcloudtrailquotelimitcolumnsECMAScript 2019equalobjcolorsReactiveExtensionsiterationCSSStyleDeclarationes-abstractl10nartYAMLRegExp#flagsconcatexit-codeenumerabletesterconfigurableutil.inspect@@toStringTagphoneexitextensionrapidmixinsinputirqquerystring_.extendconnectupsymbolsaccessibilitybrowserslistfoldersameValueZeroprocessextendwarningclass-validatoreslintconfigpnpm9ECMAScript 3settingsObject.ispromisevpclookecmascriptiteratortddyamlgetOwnPropertyDescriptorgroupconsumecheckpureunicodecircularcss lessbusytapeform-validation-0Object.assignmapreduceeventDispatcherchannelemojiserializerSethasOwnsetterinferencepreprocessorguidgroupByjapaneseparentgetPrototypeOfredux-toolkitmkdirswritable$.extendbundlingTypeBoxlanguagerdsES2023offsetrgbreducermobileloggingloadbalancingqueryES2015nativees2015sliceerrores2018fseventsreadURLFunction.prototype.nameStreamcall-bindtrimEndcharactermergebabel-coretypedarrayastlimitedJSONmiddlewaremimetypesArray.prototype.flatMapES8watchertslibentrieselasticacheieremovereduxchaicurlansispinnerbuffers3ddynamodbxssless compileruuidenvironmenttypesafetypanionfunctionserializationesmkdirexpressiontypescriptpropertyapisetPrototypeOfmochaIteratorES2021Object.definePropertyconsolevaluecompile lesses-shim APIcodesajvES2016handlersflatweakmapi18nInt32Arraydotenvcode pointsUnderscoreESnextUint32ArraysuperstructtyperequestArray.prototype.containstrimStartsortnegative zeroinvariantglacierstreams2ajaxoptimizermakedeleteio-tsminimales5concatMapfull-widthArrayRFC-6455lintsanitizefast-deep-clonesimpledbrequireoutputfilterFloat32Arrayelectronauthfastcloneutilityreadablestreames8balancedhasarktypeHyBiloadingshebangclassnameglobreadableebssymbolworkflowweaksettc39symlinksvalidatefunctionalawesomesauceUint16ArraypipeeveryfindLastIndexString.prototype.matchAlloption256prefixes6vesthigher-orderdayjsprogressreact posecallboundjsonpathfastcopytimeshrinkwrap[[Prototype]]deep-cloneargvString.prototype.trimAsyncIterator__proto__formrobustwaitpersistentopensigintregular expressionwalkingpackagesdirectorygradients csssnsWebSocketsES2020rfc4122bytesymlinkomitUint8ArraymatchAllinstallless.jsuninstallbyteOffsetcolorhashvalidasciitypeerrorcall-boundcjkeslint-pluginInt16ArrayObject.fromEntriesstylesdeepcopyES2019route53jQuerydiffwordbreakgetintrinsicisConcatSpreadablesetImmediatefpnameswafECMAScript 6boundcryptodragassertsafebootstrap lessdatawatchES2017propertieszodwhichrmdircollectionfunctionstermthrottledescriptionpromisesprettyrangeerrordiremrBigUint64Arraycurriedtapstyleguidefile systemvariables in cssWebSocketgdprtranspilehttpassignreuseObservablesArrayBuffer.prototype.slicecss-in-jsassertsjsxlru.envlook-upcontainsfast-deep-copydeepclonefastifyfsratematchratelimitoncearraybufferlinuxbddtestgenericslettoArrayinternalxhrhookformawaitqsArrayBuffer#slicetoobjectintrinsicstoragegatewayMicrosoftbootstrap csstoStringTagjsdomfind-upts0lockfilepatchwriteargsrecursiveequalityflagdataviewresolvepathclilazyserializefast-clonereact-hook-formstringifydeepECMAScript 7ttylinewrapsyntaxeslintdependency managerArray.prototype.findLastinternal slotES7varauthenticationcallbindlengthpropregularstatusfullObjectbrowserECMAScript 2018utilinspectfigletbeanstalkrm -rfharmonysharedenderdebugtrimRightshimformattingcoercibleReflect.getPrototypeOfparsereact-testing-librarythreejsonschemababelcrypthelpersiamcharactersinterruptsprotovariablestranspilerStyleSheetmrudeterministicpopmotionArray.prototype.flattenregexphttpstostringtagprivate datachinesequeueMicrotaskslotstreaminstallercallbackpackageidledateTypedArraynodemodulechromiumimportyupparserpositivequeuefantasy-landarrayformatbufferincludesECMAScript 2015windowsObservablepluginECMAScript 2020fileurlpushtacitworkspace:*forEachdataViewcloudwatchdescriptorsjasminesearchlessutilitiesjson-schemadependenciesnpmfastcommandpasswordReactiveXmoveloggerpackage.jsonjavascriptcss nestingmetadatatestinglistenersnumberwalkautoprefixerendpointArray.prototype.includestyped arrayhooksconstgradients css3stablemkdirpArray.prototype.findLastIndexfixed-widthkoreanramdabundlerpostcss-plugincsses2016agentURLSearchParamsdom-testing-librarycacheencryptioncommanderstructuredClonecloudfrontstylesheetoperating-systemsideasyncprototypeECMAScript 5gesturescolumnPushkinesisregular expressionsextracalldefinefromBigInt64ArrayES2018ES5viewreactenvbindsuperagentdescriptorECMAScript 2017touchmake dirclassnameselbaccessorclonerm -frexpresskeyscomparejson-schema-validationswfRxnamecorss3widthJSON-SchemaWeakMapimmutablewraprmES3sanitizationforms6to5datastructurefast-copyassertionjsdiffcloudformationsyntaxerrorless mixinsargumenttoolkiteast-asian-widthnegativeec2chromegetsharedarraybufferworkerdompreserve-symlinksindicatorspringjestObject.keyscloudsearchtoSortedfindshelllibphonenumberpolyfilltaskstarterconfigtypedarraysnopetelephoneECMAScript 2023ECMAScript 2022es2017parsingFloat64ArraySymbol.toStringTagcss variablecensorpoint-freesigtermthroatstyled-componentsESperformantsqspostcssconcurrencycorestringifierdebuggercolourpackage managerlesscssobjectspecbannerwgetbyteLengthuser-streamsduplexUint8ClampedArraytypesmime-dbcompilerStreamsECMAScript 2021protobufES6keyredactmimeArrayBufferposewaapiprunePromiseimmerregexpyyamlwatchingcollection.es6signalsestreeterminalprotocol-buffersstringObject.valuesES2022typeoftrimreducedeep-copyefficientstylingclasseskarmaimportexportemitstylelink
2.1.4

10 days ago

2.0.4

11 days ago

2.0.3

12 days ago

2.0.2

13 days ago

2.0.1

14 days ago

2.0.0

15 days ago

1.0.0

16 days ago