1.0.0 • Published 1 year ago

@tea062024/deserunt-repellat-accusamus v1.0.0

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

@tea062024/deserunt-repellat-accusamus

The missing one-liner utility to get the dirname from import.meta.url.

Requires Node 12.17.0 or Node 14.0.0.

Starting in Node 20.11.0 and Node 21.2.0 this is now built in: import.meta.dirname / import.meta.filename

Install

npm i @tea062024/deserunt-repellat-accusamus

Usage

import @tea062024/deserunt-repellat-accusamus from '@tea062024/deserunt-repellat-accusamus'

console.log(@tea062024/deserunt-repellat-accusamus(import.meta.url))

or

import { dirname, filename, join } from '@tea062024/deserunt-repellat-accusamus'

// same as CommonJS __dirname
console.log(dirname(import.meta.url))

// same as CommonJS __filename
console.log(filename(import.meta.url))

// same as CommonJS path.join(__dirname, 'routes')
console.log(join(import.meta.url, 'routes'))

// same as CommonJS path.join(__dirname, '..', 'other')
console.log(join(import.meta.url, '..', 'other'))

License

MIT

endpointwidthES2023ESassignspecsignalserializer@@toStringTagsymlinksfpsES6mkdirpsharedintrinsicjsonarrayswafi18nECMAScript 7wgethandlerssidemruchaies6Object.getPrototypeOfbrowserslistenderUint16ArraycryptopackageReactiveXstringifierloggingcode pointsquerystringconcurrencyfind-uphookformpackagesstabletypeerrorparsingshebanghasreact.envsinatraconcatMaprgblazyObservablesTypedArraybuffersperformanthasOwngetPrototypeOfwatchFileinferencegetBigInt64Arraydeep-clonereact-testing-libraryproxymetadatatypanionweakmapgroupByexpressjoiObject.fromEntriesUint8ClampedArrayruntimeprogressthroatamazondeleteECMAScript 2021Uint8ArraymimemomentclassnamesMapArrayBuffer.prototype.slicecoerciblenpmAsyncIteratortypedarrayasciitostringtagimmerrm -rfcss variablesyntaxguidboundhttpspreprocessorregexpES2015Array.prototype.filterwarningnested cssjQuerysearchdependency managerarraybufferYAMLeventDispatcherdescriptorpersistentextensionworkspace:*weaksethttpsigintlockfilesignalslinewrapbootstrap csstrimRightless.jsArray.prototype.includesstoragegatewayfast-cloneqszoddeepcloneswfwriteObject.valuestypescriptdatastructurekoreancharacterhookstrimeast-asian-widthdatamapreducenegativeUnderscoreloadbalancingfindJSONstreamsObservableflatMapfetchbyteLengthlintiterationpropertyassertexit-codelinuxRegExp.prototype.flagsstylesrapiddataviewFunction.prototype.nameargvcheckwalkingserializeprocessxhrparseinstalleridperformancecodestrimStartstylesheettraversesharedarraybuffernodejsnamesdynamodbstringifypruneerrorSymbol.toStringTagmacospackage managerclonewhichfullwidthrangeerrorES2019pathObject.assigncurlimportgenericsxtermstatusmkdirsexitfindupES2022ES2018MicrosoftcolorlinkstarterchromeArray.prototype.findLastrequirepnpm9phoneintoArraysetPrototypeOfless csssetImmediateArray.prototype.flattenagentlook[[Prototype]]prototypemulti-packagetypesafedayjsfunctionalCSSStyleDeclarationpasswordponyfillredux-toolkitcallbackratelimitbreakworkerWebSocketsfixed-widthbindECMAScript 2017es-abstractjasmineurlpromisesfluxratereadreducerFloat64ArrayInt8Array_.extendqueueMicrotaskdeepcopyoptimizerclassnamelogescapearktypeworkflowcreatecall-bindspeedsameValueZeroidentifierspostcsses7routerstyled-componentsECMAScript 5symbolsecmascriptes2018String.prototype.matchAllelmdebugcloudformationreusetoobjectformselbES8Object.entries
1.0.0

1 year ago