{"name":"os-paths","version":"7.4.0","description":"Determine common OS/platform paths (home, temp, ...)","license":"MIT","repository":{"type":"git","url":"git+https://github.com/rivy/js.os-paths.git"},"author":{"name":"Roy Ivy III","email":"rivy.dev@gmail.com"},"engines":{"node":">= 4.0"},"packageManager":"yarn@1.22.19","type":"commonjs","main":"./dist/cjs/mod.cjs.js","module":"./dist/cjs/esm-wrapper/mod.esm.js","types":"./dist/types/mod.d.ts","exports":{".":{"deno":"./src/mod.deno.ts","import":"./dist/cjs/esm-wrapper/mod.esm.js","require":"./dist/cjs/mod.cjs.js","types":"./dist/types/mod.d.ts","default":"./dist/cjs/mod.cjs.js"},"./package.json":"./package.json","./cjs":{"require":"./dist/cjs/mod.cjs.js","types":"./dist/cjs/mod.cjs.d.ts"}},"keywords":["common","cross-platform","directory","environment","linux","mac","macos","node4","node6","node-v4","node-v6","osx","path","paths","portable","unix","windows"],"scripts":{"# build # build/compile package":"","build":"run-s --silent \"build:*\"","build:cjs":"exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-cjs.succeeded \"run-s -n rebuild:cjs\"","build:esm":"exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-esm.succeeded \"run-s -n rebuild:esm\"","build:umd":"exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-umd.succeeded \"run-s -n rebuild:umd\"","build:lab":"exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-lab.succeeded \"run-s -n rebuild:lab\"","build:types":"exec-if-updated --source package.json --source tsconfig.json --source \"tsconfig/**\" --source \"rollup.*.config.js\" --source \"src/**\" --target build/.targets/build-types.succeeded \"run-s -n rebuild:types\"","# clean # remove build artifacts":"","clean":"shx rm -fr build dist","# coverage # calculate and display (or send) code coverage [alias: 'cov']":"","coverage":"run-s --silent +:max-node-8 && shx echo \"[coverage] WARN Code coverage skipped [for NodeJS < v10]\" 1>&2 || run-s \"+:coverage\"","cov":"run-s coverage","cov:html":"nyc report --reporter=html --report-dir=.coverage","#* cov:send # use `--cov-send=...` to pass options to coverage uploader":"","cov:send":"shx mkdir -p .coverage && nyc report --reporter=text-lcov > \".coverage/@coverage.lcov\" && cross-env-shell codecov --disable=gcov --file=\".coverage/@coverage.lcov\" $npm_config_cov_send","cov:text":"nyc report","cov:view":"run-s cov:html && cd .coverage && open-cli index.html","dist":"run-s update","# fix # fix package issues (automated/non-interactive)":"","fix":"run-s fix:*","# fix:lint # fix ESLint issues":"","fix:lint":"eslint . --fix","# fix:style # fix Prettier formatting issues":"","fix:style":"prettier . --write --list-different","# help # display help":"","help":"run-s --silent _:help","# lint # check for package code 'lint'":"","lint":"run-s --silent +:max-node-8 && shx echo \"[lint] WARN Lint checks skipped [for NodeJS < v10]\" 1>&2 || run-p --print-name \"lint:*\"","# lint:audit # check for `npm audit` violations in project code":"","lint:audit":"run-s --silent -- npm audit --omit dev","# lint:commits # check for commit flaws (using `commitlint` and `cspell`)":"","lint:commits":"run-p --silent \"_:lint:commits:new:*\"","# lint:editorconfig # check for EditorConfig format flaws (using `editorconfig-checker`)":"","lint:editorconfig":"editorconfig-checker -config .ecrc.JS.json","# lint:lint # check for code 'lint' (using `eslint`)":"","lint:lint":"eslint .","# lint:markdown # check for markdown errors (using `remark`)":"","lint:markdown":"remark --quiet .","# lint:spell # check for spelling errors (using `cspell`)":"","lint:spell":"cspell {eg,examples,src,test}/**/* CHANGELOG{,.md,.mkd} README{,.md,.mkd} --no-summary --config \".vscode/cspell.json\"","# lint:style # check for format imperfections (using `prettier`)":"","lint:style":"prettier . --check --loglevel warn","# prerelease # clean, rebuild, and fully test (useful prior to publish/release)":"","prerelease":"run-s clean update verify","# realclean # remove all generated files":"","realclean":"run-s clean && shx rm -fr .coverage .nyc_output","# rebuild # clean and (re-)build project":"","rebuild":"run-s clean build","rebuild:all":"run-s clean build update","rebuild:cjs":"shx rm -fr build/cjs && tsc -p tsconfig/tsconfig.cjs.json && shx cp -r src/esm-wrapper build/cjs/src && shx mkdir -p build/.targets && shx touch build/.targets/build-cjs.succeeded","rebuild:esm":"shx rm -fr build/esm && tsc -p tsconfig/tsconfig.esm.json && shx cp src/esm-wrapper/package.json build/esm/src && shx mkdir -p build/.targets && shx touch build/.targets/build-esm.succeeded","rebuild:umd":"shx rm -fr build/umd && tsc -p tsconfig/tsconfig.umd.json && shx mkdir -p build/.targets && shx touch build/.targets/build-umd.succeeded","rebuild:lab":"shx rm -fr build/lab && tsc -p tsconfig/tsconfig.lab.json && shx cp -r src/esm-wrapper build/lab/src && shx mkdir -p build/.targets && shx touch build/.targets/build-lab.succeeded","rebuild:types":"shx rm -fr build/types && tsc -p tsconfig/tsconfig.types.json && shx mkdir -p build/.targets && shx touch build/.targets/build-types.succeeded","# refresh # clean and rebuild/regenerate all project artifacts":"","refresh":"run-s rebuild:all","# refresh:dist # clean, rebuild, and regenerate project distribution":"","refresh:dist":"run-s rebuild update:dist","# retest # clean and (re-)test project":"","retest":"run-s clean test","# reset:hard # remove *all* generated files and reinstall dependencies":"","reset:hard":"git clean -dfx && git reset --hard && npm install","# show:deps # show package dependencies":"","show:deps":"run-s --silent _:show:deps:prod _:show:deps:dev || shx true","# test # test package":"","test":"run-s --silent lint update:dist && run-p test:*","# test:code # test package code (use `--test-code=...` to pass options to testing harness)":"","test:code":"run-s --silent +:max-node-8 && cross-env-shell ava $npm_config_test_code || ( run-s --silent +:min-node-10 && cross-env-shell nyc --silent ava $npm_config_test_code )","# test:types # test for type declaration errors (using `tsd`)":"","test:types":"run-s --silent +:max-node-8 && shx echo \"[test:types] WARN Type testing skipped [for NodeJS < v10]\" 1>&2 || tsd","# update # update/prepare for distribution [alias: 'dist']":"","update":"run-s update:changelog update:dist","# update:changelog # update CHANGELOG (using `git changelog ...`)":"","update:changelog":"run-s --silent _:update:changelog && git diff --quiet --exit-code CHANGELOG.mkd || shx echo \"[update] info CHANGELOG updated\"","# update:dist # update distribution content":"","update:dist":"run-s --silent build && exec-if-updated --source \"build/**\" --target \"dist/**\" --target build/.targets/update-dist.succeeded \"run-s --silent _:update:dist:rebuild\"","# verify # fully (and verbosely) test package":"","verify":"cross-env npm_config_test_dist=true npm_config_test=--verbose run-s test","## +:... == sub-scripts (may run 'visibly', but not user-facing)":"","+:coverage":"run-s build test:code && ( is-ci && run-s cov:send ) || ( run-s --silent _:is-not-ci && run-s cov:view )","+:max-node-8":"is-node-not-modern 10","+:min-node-10":"is-node-modern 10","## _:... == sub-scripts ('hidden'; generally should be run 'silently' using `run-s/run-p --silent ...`":"","_:debug:env":"node -e \"console.log({env: process.env})\"","_:exists:git-changelog":"node -e \"if (!require('command-exists').sync('git-changelog')){process.exit(1);};\" || ( shx echo \"WARN `git-changelog` missing (try `go get -u github.com/rivy-go/git-changelog/cmd/git-changelog`)\" & exit 1 )","* _:help # print usage/TARGETs by matching lines containing leading double-quoted text like `# TARGET_NAME # HELP_TEXT`":"","_:help":"< package.json node -e \"s = {p:'',e:'npm'}; if (new String(process.env.npm_execpath).match(/yarn.js$/)) { s = {p:'\\n',e:'yarn'}; }; console.log('%sUsage: \\`\\x1b[2m%s run TARGET\\x1b[m\\` or \\`\\x1b[2mnpx run-s TARGET [TARGET..]\\x1b[m\\`\\n\\nTARGETs:\\n', s.p, s.e); re = /^.*?\\x22(?:#\\s*)(\\w[^#\\x22]*)\\s+#+\\s+([^\\x22]+?)(\\s+#+)?\\x22.*$/; require('readline').createInterface({ input: process.stdin, output: process.stdout, terminal: false }).on('line', function(line){ if (match = re.exec(line)) { console.log('\\x1b[0;32m%s\\x1b[m %s', match[1].padEnd(19), match[2]); } }).on('close', () => { /^win/i.test(process.platform) || console.log(); });\"","_:is-not-ci":"is-ci && exit 1 || exit 0","_:lint:commits:all:spell":"node -e \"result=require('child_process').spawnSync('git log --color=never | cspell stdin --no-summary --config \".vscode/cspell.json\"',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[cspell] ERR! Unknown words in commit(s)\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"","* _:lint:commits:new:... * note: review from 'origin/last' or tag just prior to version-sorted latest, with fallback to first commit":"","_:lint:commits:new:commitlint":"node -e \"result=require('child_process').spawnSync('( git tag --list [#v]* --contains origin/last --sort=v:refname || shx true ) && ( git describe --tags --abbrev=0 HEAD~1 || shx true ) && ( git rev-list --max-parents=0 HEAD --abbrev-commit --abbrev=16 || shx true )',{shell:true,encoding:'utf-8'}); o=result.stdout.split(/\\r?\\n/).filter((s)=>!!s); vs=o; v=vs[0]; result=require('child_process').spawnSync('commitlint --config .commitlint.config.js --from '+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[commitlint] ERR! Flawed commit(s) found (within \\'%s..HEAD\\')\\n'+result.stdout+'\\n'+result.stderr, v); process.exit(1);} else { (result.stdout.length > 0) && console.log(result.stdout);};\" || shx true","_:lint:commits:new:spell":"node -e \"result=require('child_process').spawnSync('( git tag --list [#v]* --contains origin/last --sort=v:refname || shx true ) && ( git describe --tags --abbrev=0 HEAD~1 || shx true ) && ( git rev-list --max-parents=0 HEAD --abbrev-commit --abbrev=16 || shx true )',{shell:true,encoding:'utf-8'}); o=result.stdout.split(/\\r?\\n/).filter((s)=>!!s); vs=o; v=vs[0]; result=require('child_process').spawnSync('git log '+v+'.. --color=never | cspell stdin --no-summary --config \".vscode/cspell.json\"',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[cspell] ERR! Unknown words in commit(s) (within \\'%s..HEAD\\')\\n'+result.stdout+'\\n'+result.stderr, v); process.exit(1);} else {(result.stdout.length > 0) && console.log(result.stdout);};\" || shx true","_:show:deps:dev":"npm --silent ls --only development || shx true","_:show:deps:prod":"npm --silent ls --only production || shx true","_:vcs-clean":"git diff --quiet","_:vcs-clean-err":"run-s --silent _:vcs-clean || ( shx echo \"[vcs] ERR! Uncommitted changes\" 1>&2 & exit 1 )","_:vcs-strictly-clean":"git status --porcelain | node -e \"process.stdin.on('data',function(_){process.exit(1);});\"","_:vcs-strictly-clean-err":"run-s --silent _:vcs-strictly-clean || ( shx echo \"[vcs] ERR! Uncommitted changes and/or untracked files\" 1>&2 & exit 1 )","_:update:changelog":"run-s --silent _:exists:git-changelog && git changelog > CHANGELOG.mkd || shx echo \"[update] WARN CHANGELOG not updated\" 1>&2","_:update:dist.build":"shx rm -fr dist/cjs dist/esm && shx mkdir -p dist/cjs dist/esm && shx cp -r build/cjs/src/* dist/cjs && shx cp -r build/esm/src/* dist/esm","_:update:dist.normalizeEOL":"eolConverter lf dist/**/*.{cjs,js,mjs,ts,json}","_:update:dist.pack":"node -e \"delete process.env.npm_config_dry_run; name=require('./package.json').name; name=name.replace(/^@/,'').replace('/','-'); result=require('child_process').spawnSync('npm pack && shx mkdir -p dist && shx mv '+name+'-*.tgz dist/'+name+'.tgz',{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('[update] ERR! Unable to package (into *.tgz) for distribution\\n'+result.stdout+'\\n'+result.stderr); process.exit(1);} else {console.log(result.stdout);};\"","_:update:dist.types":"shx mkdir -p dist && shx rm -fr dist/types && rollup --config .rollup.config.types.js && replace-in-file \"export { _default as default }\" \"export = _default\" dist/types/mod.cjs.d.ts --quiet && shx mkdir -p dist/cjs && shx cp dist/types/*.cjs.d.ts dist/cjs","_:update:dist:rebuild":"shx rm -fr dist && run-s --silent _:update:dist.build _:update:dist.types _:update:dist.normalizeEOL _:update:dist.pack && shx mkdir -p dist/.targets && shx touch build/.targets/update-dist.succeeded","_:version:spell:changelog_update":"run-s --silent _:exists:git-changelog && git changelog -u | cspell stdin --config \".vscode/cspell.json\" || shx echo \"[lint] WARN CHANGELOG update `cspell` exception\" 1>&2","_:version:update:changelog":"run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag-now --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {m='fs';require(m).writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2","## npm lifecycle scripts ##":"","prepublishOnly":"run-s clean update && cross-env npm_config_test_dist=true npm run test && run-s --silent update _:vcs-strictly-clean-err","## npm-version scripts ##":"","preversion":"run-s --silent _:version:spell:changelog_update && cross-env npm_config_test_dist=true npm run test","version":"run-s --silent _:version:update:changelog && run-s lint:spell && run-s --silent update:dist && git add CHANGELOG.mkd dist"},"dependencies":{"fsevents":"*"},"devDependencies:#":"* for testing, Node-v6 requires ava < v2 and nyc < v15","devDependencies":{"@ava/typescript":"^1.1.1","@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^11.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1","@types/node":"^14.14.20","@typescript-eslint/eslint-plugin":"^4","@typescript-eslint/parser":"^4","ava":"^3.15.0","codecov":"^3.5.0","command-exists":"^1.2.9","cross-env":"^7.0.3","cross-spawn":"^7.0.3","cspell":"^4.2.7","editorconfig-checker":"^3.3.0","eol-converter-cli":"^1.0.8","eslint":"^7","eslint-config-prettier":"^7","eslint-plugin-eslint-comments":"^3","eslint-plugin-functional":"^3","eslint-plugin-import":"^2","eslint-plugin-security":"^1","eslint-plugin-security-node":"^1","exec-if-updated":"https://cdn.jsdelivr.net/gh/rivy/js-cli.exec-if-updated@2.2.0/dist/pkg/exec-if-updated.tgz","is-ci":"^2.0.0","is-node-modern":"^1.0.0","npm-run-all":"^4.1.5","nyc":"^15.1.0","open-cli":">=6.0 <7.0","prettier":"^2.1.1","remark-cli":"=9.0.0","remark-footnotes":"^3.0.0","remark-preset-lint-consistent":"^4.0.0","remark-preset-lint-markdown-style-guide":"^4.0.0","remark-preset-lint-recommended":"^5.0.0","remark-retext":"^4.0.0","replace-in-file":"=6.3.0","retext-english":"^3.0.4","retext-passive":"^3.0.0","retext-repeated-words":"^3.0.0","retext-sentence-spacing":"^4.0.0","retext-syntax-urls":"^2.0.0","rollup":"^2.36.1","rollup-plugin-dts":"^2.0.1","rollup-plugin-typescript2":"^0.29.0","shx":"^0.3.3","ts-node":"^9.0.0","tsd":"^0.14.0","typedoc":"^0.20.27","typescript":"~4.2.0","unified":"^9.2.0"},"optionalDependencies:#":"* 'fsevents' included to avoid `npm ci` errors with early npm versions; ref: <https://github.com/bahmutov/npm-install/issues/103>","optionalDependencies":{"fsevents":"*"},"ava":{"files":["!**/*.test-d.ts"],"timeout":"60s","typescript":{"rewritePaths":{"src/":"build/lab/src/"}}},"nyc":{"extends":"@istanbuljs/nyc-config-typescript","exclude":["build/cjs/**","build/esm/**","build/umd/**","dist/**","eg/**","test/**","**/*.test.*","**/*.spec.*"],"reporter":["html","text"],"lines":"100","branches":"96","statements":"100"},"tsd":{"directory":"test"},"gitHead":"96af485748e5b973afe00905701bce30a337b228","bugs":{"url":"https://github.com/rivy/js.os-paths/issues"},"homepage":"https://github.com/rivy/js.os-paths#readme","_id":"os-paths@7.4.0","_nodeVersion":"10.23.1","_npmVersion":"7.24.2","dist":{"integrity":"sha512-Ux1J4NUqC6tZayBqLN1kUlDAEvLiQlli/53sSddU4IN+h+3xxnv2HmRSMpVSvr1hvJzotfMs3ERvETGK+f4OwA==","shasum":"3354f1814425c232b6f42138a90e4000af6f9692","tarball":"http://registry-npm.ywwl.com/os-paths/download/os-paths-7.4.0.tgz","fileCount":14,"unpackedSize":131419,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCij2mkGLybePds1+cSjF94/aNVcCfTMxxQ+e3ITg2qQAIhAKCvUxdcggEc25oRzi6ImzFdZDy9Jboc2v5oukn6HAYp"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4YO2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGww/8CnDLbdWfVRMQBpwfWGUCwwUNOcf4RGCCo8oB8Tev5fHrBkKg\r\n65mUgkGgOwZC02NQ6uIROoFkb+BAer0GSCj5gXAnhGKeT1ZHVK94/GoPNgT7\r\nlo3hLrNQK3Qd5VxRplNFV/mRKONUxMunGXstKWGa+NYeL7lTdfEfieDNUk3V\r\npntd56KmoitcEjod8ye65Lx7cWsgSkLWNxEAXovu/DXu7s2K0sWScrSsxYXg\r\nMiKFxXfGfB1nC0Ae5czZckTS/zH377tMQUDJy3aDn+KIcRU8FHk5oA59+pe+\r\nu/SmbS6Q+2KYPZSvL6DIWAcsyxhl2EkZbQupcZ1dFjteXwvlhYlKTF6s0qw7\r\nsvb5Eg4YPR9ykGVmy86Q4V4jL97rVZlQBYGHUQG2aRhv22AvABfcNOrBAUXN\r\n9ny9E6Tzpxx+VAFxfyUWxE4e28sZP72XlG6BdjIchnXeXUEY7g9sgBGzpnG8\r\n8qq9NPue0tR7vFG0anQMVPtKUR94SthepZyyFRjXfbkMqKg2m8LnkZDBaBMz\r\n4l6R4aVYMhjaA5cl9ATNKnZCM6R8nxGusK9HnOZnQfNPhu0hRxnZIASQDNjF\r\nqS8UtlzFRkFsyM6kl34au4+vvTGnsHW30vHMnl+MjvHrnUBgldCv2GFY4If2\r\nHlwV674OoxX6d7ggR9p/VtkzV+1y8zKj23E=\r\n=9WZl\r\n-----END PGP SIGNATURE-----\r\n","size":39343,"noattachment":false,"key":"/os-paths/-/os-paths-7.4.0.tgz"},"_npmUser":{"name":"rivy","email":"rivy.dev@gmail.com"},"directories":{},"maintainers":[{"name":"rivy","email":"rivy.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/os-paths_7.4.0_1675723701809_0.945919181472233"},"_hasShrinkwrap":false,"readme":"<!-- dprint-ignore-file -->\n<!-- deno-fmt-ignore-start -->\n\n<!-- @prettier -->\n<!DOCTYPE markdown><!-- markdownlint-disable first-line-heading no-inline-html -->\n<meta charset=\"utf-8\" content=\"text/markdown\" lang=\"en\">\n<!-- -## editors ## (emacs/sublime) -*- coding: utf8-nix; tab-width: 4; mode: markdown; indent-tabs-mode: nil; basic-offset: 2; st-word_wrap: 'true' -*- ## (jEdit) :tabSize=4:indentSize=4:mode=markdown: ## (notepad++) vim:tabstop=4:syntax=markdown:expandtab:smarttab:softtabstop=2 ## modeline (see <https://archive.is/djTUD>@@<http://webcitation.org/66W3EhCAP> ) -->\n<!-- spell-checker:ignore expandtab markdownlint modeline smarttab softtabstop -->\n\n<!-- markdownlint-disable heading-increment no-duplicate-heading -->\n<!-- spell-checker:ignore (abbrev/names) CICD CJS Codacy Deno Dprint ESM ESMs JSDelivr npmJS uutils -->\n<!-- spell-checker:ignore (targets) realclean -->\n<!-- spell-checker:ignore (people) Roy Ivy III * rivy -->\n\n# [os-paths](https://github.com/rivy/js.os-paths)\n\n> Determine common OS/platform paths (home, temp, ...)\n\n[![Build status (GHA)][gha-image]][gha-url]\n[![Build status (AppVeyor)][appveyor-image]][appveyor-url]\n[![Coverage status][coverage-image]][coverage-url]\n[![License][license-image]][license-url]\n[![Style Guide][style-image]][style-url]\n&nbsp; <br/>\n[![Repository][repository-image]][repository-url]\n[![Deno version][deno-image]][deno-url]\n[![NPM version][npm-image]][npm-url]\n[![NodeJS version][nodejsv-image]][repository-url]\n[![npmJS Downloads][downloads-image]][downloads-url]\n[![JSDelivr Downloads][jsdelivr-image]][jsdelivr-url]\n\n## Installation (CJS/ESM/TypeScript)\n\n<!-- ref: [JSDelivr ~ GitHub](https://www.jsdelivr.com/documentation#id-github) @@ <https://archive.is/c8s9Y> -->\n\n```shell\nnpm install os-paths\n# or... `npm install \"git:github.com/rivy/js.os-paths\"`\n# or... `npm install \"git:github.com/rivy/js.os-paths#v7.4.0\"`\n# or... `npm install \"https://cdn.jsdelivr.net/gh/rivy/js.os-paths@v7.4.0/dist/os-paths.tgz\"`\n# or... `npm install \"https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT_SHA/dist/os-paths.tgz\"`\n```\n\n## Usage\n\n#### CommonJS (CJS)\n\n```js\nconst osPaths = require('os-paths/cjs');\nconst home = osPaths.home();\nconst temp = osPaths.temp();\n```\n\n#### ECMAScript (ESM)/TypeScript\n\n```js\nimport osPaths from 'os-paths';\nconst home = osPaths.home();\nconst temp = osPaths.temp();\n```\n\n#### Deno\n\n<!-- ref: [JSDelivr ~ GitHub](https://www.jsdelivr.com/documentation#id-github) @@ <https://archive.is/c8s9Y> -->\n\n```ts\nimport osPaths from 'https://deno.land/x/os_paths@v7.4.0/src/mod.deno.ts';\n//or (via CDN, [ie, JSDelivr with GitHub version/version-range, commit, 'latest' support])...\n//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@v7.4.0/src/mod.deno.ts';\n//import osPaths from 'https://cdn.jsdelivr.net/gh/rivy/js.os-paths@COMMIT_SHA/src/mod.deno.ts';\nconst home = osPaths.home();\nconst temp = osPaths.temp();\n```\n\n## API\n\n### Construction/Initialization\n\n#### `OSPaths()`\n\n```js\nconst osPaths = require('os-paths/cjs'); // CJS\n//or...\n//import osPaths from 'os-paths'; // ESM/TypeScript\n//import osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts'; // Deno\n```\n\nWhen importing this module, the object returned is a function object, `OSPaths`, augmented with attached methods. Additional `OSPaths` objects may be constructed by direct call of the imported `OSPaths` object (eg, `const p = osPaths()`) or by using `new` (eg, `const p = new osPaths()`). Notably, since the `OSPaths` object contains no instance state, all `OSPaths` objects will be functionally identical.\n\n### Methods\n\nAll methods return simple, platform-specific, and platform-compatible path strings which are normalized and have no trailing path separators.\n\nThe returned path strings are _not_ guaranteed to already exist on the file system. So, the user application is responsible for directory construction, if/when needed. However, since all of these are _standard_ OS directories, they should all exist without the need for user intervention.\n\nIf/when necessary, [`make-dir`](https://www.npmjs.com/package/make-dir) or [`mkdirp`](https://www.npmjs.com/package/mkdirp) can be used to create the directories.\n\n#### `osPaths.home(): string | undefined`\n\n- Returns the path string of the user's home directory (or `undefined` if the user's home directory is not resolvable).\n\n```js\nconsole.log(osPaths.home());\n//(*nix) => '/home/rivy\n//(windows) =>  'C:\\Users\\rivy'\n```\n\n#### `osPaths.temp(): string`\n\n- Returns the path string of the system's default directory for temporary files.\n\n```js\nconsole.log(osPaths.temp());\n//(*nix) => '/tmp'\n//(windows) =>  'C:\\Users\\rivy\\AppData\\Local\\Temp'\n```\n\n`temp()` will _always_ return a non-empty path string (as sanely as possible).\n\n## Supported Platforms\n\n### NodeJS\n\n> #### Requirements\n>\n> NodeJS >= 4.0[^*]\n\n<!--{blockquote: .--info style=\"font-size:75%;\"}-->\n\n[^*]: With the conversion to a TypeScript-based project, due to tooling constraints, building and testing are more difficult and more limited on Node platforms earlier than NodeJS-v10. However, the generated CommonJS/UMD project code is fully tested (for NodeJS-v10+) and continues to be compatible with NodeJS-v4+.\n\n#### CommonJS modules (CJS; `*.js` and `*.cjs`)\n\nCJS is the basic supported output (with support for NodeJS versions as early as NodeJS-v4).\n\n```js\nconst osPaths = require('os-paths/cjs');\nconsole.log(osPaths.home());\nconsole.log(osPaths.temp());\n```\n\n> Note: for CJS, `require('os-paths')` is supported for backward-compatibility and will execute correctly at run-time. However, `require('os-paths')` links to the default package type declarations which, though _correct_ for Deno/ESM/TypeScript, are _incorrect_ for CJS. This, then, leads to incorrect analysis of CJS files by static analysis tools such as TypeScript and Intellisense.\n>\n> Using `require('os-paths/cjs')` is preferred as it associates the proper CJS type declarations and provides correct information to static analysis tools.\n\n#### ECMAScript modules (ESM; `*.mjs`)\n\n- <small><span title=\"ESM support added in v6.0\">Requires `OSPaths` `v6.0`+.</span></small>\n\n`OSPaths` fully supports ESM imports.\n\n```js\nimport osPaths from 'os-paths';\nconsole.log(osPaths.home());\nconsole.log(osPaths.temp());\n```\n\n### TypeScript (`*.ts`)\n\n- <small><span title=\"TypeScript support added in v5.0\">Requires `OSPaths` `v5.0`+.</span></small>\n\nAs of `v5.0`+, `OSPaths` has been converted to a TypeScript-based module.\nAs a consequence, TypeScript type definitions are automatically generated, bundled, and exported by the module.\n\n### Deno\n\n> #### Requirements\n>\n> Deno >= v1.8.0[^deno-version-req]\n\n<!--{blockquote: .--info style=\"font-size:75%;\"}-->\n\n[^deno-version-req]: The `Deno.permissions` API (stabilized in Deno v1.8.0) is required to avoid needless panics or prompts by Deno during static imports of this module/package. Note: Deno v1.3.0+ may be used if the run flag `--unstable` is also used.\n\n> #### Required Permissions\n>\n> - `--allow-env` &middot; _allow access to the process environment variables_<br>\n>   This module/package requires access to various environment variables to determine platform configuration (eg, location of temp and user directories).\n\n<!--{blockquote: .--info style=\"font-size:75%;\"}-->\n\n- <small><span title=\"Deno support added in v6.0\">Requires `OSPaths` `v6.0`+.</span></small>\n\n`OSPaths` also fully supports use by Deno.\n\n```js deno\nimport osPaths from 'https://deno.land/x/os_paths/src/mod.deno.ts';\nconsole.log(osPaths.home());\nconsole.log(osPaths.temp());\n```\n\n## Building and Contributing\n\n[![Repository][repository-image]][repository-url]\n[![Build status (GHA)][gha-image]][gha-url]\n[![Build status (AppVeyor)][appveyor-image]][appveyor-url]\n[![Coverage status][coverage-image]][coverage-url]\n&nbsp; <br/>\n[![Quality status (Codacy)][codacy-image]][codacy-url]\n[![Quality status (CodeClimate)][codeclimate-image]][codeclimate-url]\n[![Quality status (CodeFactor)][codefactor-image]][codefactor-url]\n\n### Build requirements\n\n- NodeJS >= 10.14\n- a JavaScript package/project manager ([`npm`](https://www.npmjs.com/get-npm) or [`yarn`](https://yarnpkg.com))\n- [`git`](https://git-scm.com)\n\n> #### optional\n>\n> - [`bmp`](https://deno.land/x/bmp@v0.0.6) (v0.0.6+) ... synchronizes version strings within the project\n> - [`git-changelog`](https://github.com/rivy-go/git-changelog) (v1.1+) ... enables changelog automation\n\n### Quick build/test\n\n```shell\nnpm install-test\n```\n\n### Contributions/development\n\n#### _Reproducible_ setup (for CI or local development)\n\n```shell\ngit clone \"https://github.com/rivy/js.os-paths\"\ncd js.os-paths\n# * note: for WinOS, replace `cp` with `copy` (or use [uutils](https://github.com/uutils/coreutils))\n# npm\ncp .deps-lock/package-lock.json .\nnpm clean-install\n# yarn\ncp .deps-lock/yarn.lock .\nyarn --immutable --immutable-cache --check-cache\n```\n\n#### Project development scripts\n\n```shell\n> npm run help\n...\nusage: `npm run TARGET` or `npx run-s TARGET [TARGET..]`\n\nTARGETs:\n\nbuild               build/compile package\nclean               remove build artifacts\ncoverage            calculate and display (or send) code coverage [alias: 'cov']\nfix                 fix package issues (automated/non-interactive)\nfix:lint            fix ESLint issues\nfix:style           fix Prettier formatting issues\nhelp                display help\nlint                check for package code 'lint'\nlint:audit          check for `npm audit` violations in project code\nlint:commits        check for commit flaws (using `commitlint` and `cspell`)\nlint:editorconfig   check for EditorConfig format flaws (using `editorconfig-checker`)\nlint:lint           check for code 'lint' (using `eslint`)\nlint:markdown       check for markdown errors (using `remark`)\nlint:spell          check for spelling errors (using `cspell`)\nlint:style          check for format imperfections (using `prettier`)\nprerelease          clean, rebuild, and fully test (useful prior to publish/release)\nrealclean           remove all generated files\nrebuild             clean and (re-)build project\nrefresh             clean and rebuild/regenerate all project artifacts\nrefresh:dist        clean, rebuild, and regenerate project distribution\nretest              clean and (re-)test project\nreset:hard          remove *all* generated files and reinstall dependencies\nshow:deps           show package dependencies\ntest                test package\ntest:code           test package code (use `--test-code=...` to pass options to testing harness)\ntest:types          test for type declaration errors (using `tsd`)\nupdate              update/prepare for distribution [alias: 'dist']\nupdate:changelog    update CHANGELOG (using `git changelog ...`)\nupdate:dist         update distribution content\nverify              fully (and verbosely) test package\n```\n\n#### Packaging & Publishing\n\n##### Package\n\n```shell\n#=== * POSIX\n# update project VERSION strings (package.json,...)\n# * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format\nbmp --minor\nVERSION=$(cat VERSION)\ngit-changelog --next-tag \"v${VERSION}\" > CHANGELOG.mkd\n# create/commit updates and distribution\ngit add package.json CHANGELOG.mkd README.md VERSION .bmp.yml\ngit commit -m \"${VERSION}\"\nnpm run clean && npm run update:dist && git add dist && git commit --amend --no-edit\n# (optional) update/save dependency locks\n# * note: `yarn import` of 'package-lock.json' (when available) is faster but may not work for later versions of 'package-lock.json'\nrm -f package-lock.json yarn.lock\nnpm install --package-lock\nyarn install\nmkdir .deps-lock 2> /dev/null\ncp package-lock.json .deps-lock/\ncp yarn.lock .deps-lock/\ngit add .deps-lock\ngit commit --amend --no-edit\n# tag VERSION commit\ngit tag -f \"v${VERSION}\"\n# (optional) prerelease checkup\nnpm run prerelease\n#=== * WinOS\n@rem # update project VERSION strings (package.json,...)\n@rem # * `bmp --[major|minor|patch]`; next VERSION in M.m.r (semver) format\nbmp --minor\nfor /f %G in (VERSION) do @set \"VERSION=%G\"\ngit-changelog --next-tag \"v%VERSION%\" > CHANGELOG.mkd\n@rem # create/commit updates and distribution\ngit add package.json CHANGELOG.mkd README.md VERSION .bmp.yml\ngit commit -m \"%VERSION%\"\nnpm run clean && npm run update:dist && git add dist && git commit --amend --no-edit\n@rem # (optional) update/save dependency locks\n@rem # * note: `yarn import` of 'package-lock.json' (when available) is faster but may not work for later versions of 'package-lock.json'\ndel package-lock.json yarn.lock 2>NUL\nnpm install --package-lock\nyarn install\nmkdir .deps-lock 2>NUL\ncopy /y package-lock.json .deps-lock >NUL\ncopy /y yarn.lock .deps-lock >NUL\ngit add .deps-lock\ngit commit --amend --no-edit\n@rem # tag VERSION commit\ngit tag -f \"v%VERSION%\"\n@rem # (optional) prerelease checkup\nnpm run prerelease\n```\n\n##### Publish\n\n```shell\n# publish\n# * optional (will be done in 'prePublishOnly' by `npm publish`)\nnpm run clean && npm run test && npm run dist && git-changelog > CHANGELOG.mkd #expect exit code == 0\ngit diff-index --quiet HEAD || echo \"[lint] ERROR uncommitted changes\" # expect no output and exit code == 0\n# *\nnpm publish # `npm publish --dry-run` will perform all prepublication actions and stop just before the actual publish push\n# * if published to NPMjs with no ERRORs; push to deno.land with tag push\ngit push origin --tags\n```\n\n### Contributions\n\nContributions are welcome.\n\nAny pull requests should be based off of the default branch (`master`). And, whenever possible, please include tests for any new code, ensuring that local (via `npm test`) and remote CI testing passes.\n\nBy contributing to the project, you are agreeing to provide your contributions under the same [license](./LICENSE) as the project itself.\n\n## Related\n\n- [`xdg-app-paths`](https://www.npmjs.com/package/xdg-app-paths) ... easy XDG for applications\n- [`xdg-portable`](https://www.npmjs.com/package/xdg-portable) ... XDG Base Directory paths (cross-platform)\n\n## License\n\n[MIT](./LICENSE) © [Roy Ivy III](https://github.com/rivy)\n\n<!-- badge references -->\n\n<!-- Repository -->\n<!-- Note: for '[repository-image] ...', `%E2%81%A3` == utf-8 sequence of \"Unicode Character 'INVISIBLE SEPARATOR' (U+2063)\"; ref: <https://codepoints.net/U+2063> -->\n\n[repository-image]: https://img.shields.io/github/v/tag/rivy/js.os-paths?sort=semver&label=%E2%81%A3&logo=github&logoColor=white\n[repository-url]: https://github.com/rivy/js.os-paths\n[license-image]: https://img.shields.io/npm/l/os-paths.svg?color=tomato&style=flat\n[license-url]: license\n[nodejsv-image]: https://img.shields.io/node/v/os-paths?color=slateblue\n[style-image]: https://img.shields.io/badge/code_style-prettier-mediumvioletred.svg\n[style-url]: https://prettier.io\n\n<!-- Continuous integration/deployment (CICD) -->\n\n[appveyor-image]: https://img.shields.io/appveyor/ci/rivy/js-os-paths/master.svg?style=flat&logo=AppVeyor&logoColor=deepskyblue\n[appveyor-url]: https://ci.appveyor.com/project/rivy/js-os-paths\n[gha-image]: https://img.shields.io/github/actions/workflow/status/rivy/js.os-paths/CI.yml?label=CI&logo=github\n[gha-url]: https://github.com/rivy/js.os-paths/actions?query=workflow%3ACI\n\n<!-- Code quality -->\n\n[coverage-image]: https://img.shields.io/codecov/c/github/rivy/js.os-paths/master.svg\n[coverage-url]: https://codecov.io/gh/rivy/js.os-paths\n[codeclimate-url]: https://codeclimate.com/github/rivy/js.os-paths\n[codeclimate-image]: https://img.shields.io/codeclimate/maintainability/rivy/js.os-paths?label=codeclimate\n[codacy-image]: https://img.shields.io/codacy/grade/4fa161040bcd483890691190293ff950?label=codacy\n[codacy-url]: https://app.codacy.com/gh/rivy/js.os-paths/dashboard\n[codefactor-image]: https://img.shields.io/codefactor/grade/github/rivy/js.os-paths?label=codefactor\n[codefactor-url]: https://www.codefactor.io/repository/github/rivy/js.os-paths\n\n<!-- Distributors/Registries -->\n\n[deno-image]: https://img.shields.io/github/package-json/v/rivy/js.os-paths/master?label=deno\n[deno-url]: https://deno.land/x/os_paths\n[downloads-image]: http://img.shields.io/npm/dm/os-paths.svg?style=flat\n[downloads-url]: https://npmjs.org/package/os-paths\n[jsdelivr-image]: https://img.shields.io/jsdelivr/gh/hm/rivy/js.os-paths?style=flat\n[jsdelivr-url]: https://www.jsdelivr.com/package/gh/rivy/js.os-paths\n[npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat\n[npm-url]: https://npmjs.org/package/os-paths\n\n<!-- Alternate/Old image/URL links -->\n\n<!-- [appveyor-image]: https://ci.appveyor.com/api/projects/status/.../branch/master?svg=true -->\n<!-- [coverage-image]: https://img.shields.io/coveralls/github/rivy/os-paths/master.svg -->\n<!-- [coverage-url]: https://coveralls.io/github/rivy/os-paths -->\n<!-- [nodejsv-image]: https://img.shields.io/node/v/os-paths.svg?style=flat&color=darkcyan -->\n<!-- [npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat -->\n<!-- [npm-image]: https://img.shields.io/npm/v/os-paths.svg?style=flat&label=npm&logo=NPM&logoColor=linen -->\n<!-- [npm-url]: https://npmjs.org/package/os-paths -->\n<!-- [repository-image]:https://img.shields.io/badge/%E2%9D%A4-darkcyan?style=flat&logo=github -->\n<!-- [repository-image]:https://img.shields.io/github/v/tag/rivy/js.os-paths?label=%e2%80%8b&logo=github&logoColor=white&colorA=gray&logoWidth=15 -->\n<!-- [scrutinizer-image]: https://img.shields.io/scrutinizer/quality/g/rivy/js.os-paths?label=scritunizer -->\n<!-- [scrutinizer-url]: https://scrutinizer-ci.com/g/rivy/js.os-paths -->\n<!-- [style-image]: https://img.shields.io/badge/code_style-XO-darkcyan.svg -->\n<!-- [style-image]: https://img.shields.io/badge/code_style-standard-darkcyan.svg -->\n<!-- [style-url]: https://github.com/xojs/xo -->\n<!-- [style-url]: https://standardjs.com -->\n<!-- [travis-image]: https://img.shields.io/travis/rivy/js.os-paths/master.svg?style=flat&logo=Travis-CI&logoColor=silver -->\n<!-- [travis-image]: https://travis-ci.org/rivy/js.os-paths.svg?branch=master -->\n<!-- [travis-image]: https://img.shields.io/travis/rivy/js.os-paths/master.svg?style=flat&logo=travis -->\n<!-- [travis-url]: https://travis-ci.org/rivy/js.os-paths -->\n","publish_time":1675723702067,"_cnpm_publish_time":1675723702067,"dist-tags":{"latest":"7.4.0"}}