{"_id":"os-locale-s-fix","_rev":"3-1e3de94bf002637c1b0697f23f7f3db6","name":"os-locale-s-fix","dist-tags":{"latest":"1.0.8-fix-1"},"versions":{"1.0.8-fix":{"name":"os-locale-s-fix","version":"1.0.8-fix","description":"Its a light weight version that minimizes the dependency module of `os-locale`","private":false,"main":"./cjs/index.js","module":"./esm/index.js","sideEffects":false,"types":"./index.d.ts","author":{"name":"jeffy-g","email":"hirotom1107@gmail.com"},"engines":{"node":">=10","yarn":"^1.22.4"},"license":"MIT","bugs":{"url":"https://github.com/jeffy-g/os-locale-s/issues"},"homepage":"https://github.com/jeffy-g/os-locale-s#readme","repository":{"type":"git","url":"git+https://github.com/jeffy-g/os-locale-s.git"},"keywords":["typescript","javascript","locale","lang","language","system","os","string","user","country","id","identifier","region"],"dependencies":{"lcid":"^3.0.0"},"devDependencies":{"jest":"^26.4.2"},"scripts":{"test":"jest --coverage --silent=false --colors -c=jest.configjs.js"},"gitHead":"a30e94f655770bb60b3bb39d2bd674572067692c","_id":"os-locale-s-fix@1.0.8-fix","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-00BFYcNU6Cdn8uYNGSNinXMxQtKiA5lqTQKrbhxpHToZ6aCUip6G4ygK4ui+YIkk+xtfPsHy2tETVKIgxd1iAQ==","shasum":"e9e8ab797072d650fde878692bae2765b804529a","tarball":"https://registry.npmjs.org/os-locale-s-fix/-/os-locale-s-fix-1.0.8-fix.tgz","fileCount":6,"unpackedSize":16489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI1WRCRA9TVsSAnZWagAAHAwP/2LUm7VwZmbIemqUeum6\nD/r+Z3vQkzJSd4bXtmYLl2I70/uxIeZ8JeLpdw6IpBVQCckpIwOos6zTT197\nPBD75pRjGVkS0ijY3Ni1zybuz8DnbyNV8sOJf2a5Qtqpc6EQxhB7QW6APHlt\ny1NRfb9YEHb0XCO0ubByjlBg84Hw1xZYNO8qusUuItxoWQaUAS/A7PXQ7Lp7\nnOuNPk557LkRjosRyIJHoTT8Gk/sFPAdugXMg1itEFxzS33ET/55JcwCZfAu\nGvOk3IiA0Ui7GXfKJ1bP3m7U1MDt3mD5iZZ98OLZ7UuEHVN6YrUTo2CMMf29\nUq2jFPwRPYanyPaYLO3h/FCnaa2anzdWJWAz2/Qvtt9TNWOPyyg+gfvPh06d\nw9b7CkB9CmBHkRyN9n43pVMPRQt1kur1cqnFefSxNn7BzL2SqIjD2PPYswAs\nWCto5G/TdlWAv3PbSzM76VgaWZvYzb+XQByN/CTiztmsPJRwNX51cEdCXtUG\nzp1gEYxE1NUmX4Nk25nPE2GZ4EwEiQ1/KND8keDVaVxuvjlLTeCHVnn+UnVD\n4fAmFmRliC8SorWbofF4qQ0IvCVDsqauhYg2p7X/lzHK0sAg1Tv5+dodSrz4\npu780hpae8T3tHjIv2zjMYyrwCkVenSoXKoNRKpSTA6g796Mu3cDlcHEu7RE\n2nRT\r\n=mb8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBe5GV7+BUxD/tYDpi7DalKhzK6j2VeuCB3dZei8TbCOAiEA6LA2kTr11cNrrE9d2WcdfSqWJQuI1b4Etr7xaQAlb9E="}]},"_npmUser":{"name":"guoshengqiang","email":"guoshengqiang@live.com"},"directories":{},"maintainers":[{"name":"guoshengqiang","email":"guoshengqiang@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/os-locale-s-fix_1.0.8-fix_1629705617540_0.37847401646116197"},"_hasShrinkwrap":false},"1.0.8-fix-1":{"name":"os-locale-s-fix","version":"1.0.8-fix-1","description":"Its a light weight version that minimizes the dependency module of `os-locale`","private":false,"main":"./cjs/index.js","module":"./esm/index.js","sideEffects":false,"types":"./index.d.ts","author":{"name":"jeffy-g","email":"hirotom1107@gmail.com"},"engines":{"node":">=10","yarn":"^1.22.4"},"license":"MIT","bugs":{"url":"https://github.com/jeffy-g/os-locale-s/issues"},"homepage":"https://github.com/jeffy-g/os-locale-s#readme","repository":{"type":"git","url":"git+https://github.com/jeffy-g/os-locale-s.git"},"keywords":["typescript","javascript","locale","lang","language","system","os","string","user","country","id","identifier","region"],"dependencies":{"lcid":"^3.0.0"},"devDependencies":{"jest":"^26.4.2"},"scripts":{"test":"jest --coverage --silent=false --colors -c=jest.configjs.js"},"gitHead":"e74c15c857e09301d8e278795493027c72b941f9","_id":"os-locale-s-fix@1.0.8-fix-1","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==","shasum":"7db4f9fc7cea29e9266900ea0bc72aaff13ff14a","tarball":"https://registry.npmjs.org/os-locale-s-fix/-/os-locale-s-fix-1.0.8-fix-1.tgz","fileCount":6,"unpackedSize":16505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh22BXCRA9TVsSAnZWagAA2/YP/jjYWwWdNfMqB+Bd/otX\nOZj5GoYo5ZKWIm6GJzVEzvEXSgtRgZtmLNreHKi7kXNMoFsvx2OyniDNiagK\naRkeAVDhrHSIzhre1U1QXSas90YCG24Lh8Tf5EXFJl1zlBfQL7YWzuuuHGc7\ndTAhxcX6vlJVX81zWDtGJJ6xcof7xFRpvdecx5BoAVl3r9PEmCmm5qukMCfo\nAhqyJOc5LG95ctJAMILye6hvfD91iCVVgZ4Q2nJRncJlo7iNlmt/wyJfS9j8\nzMgcGOMoukqigvA8on/jLLp4IArSp0ZBDRsrJ189BRaNVyfa20ULYhmmWazr\nbQxkIAx9TtH8l4Z6DKZNZ4eoYpdCGY9CsFPPOvw4LNjW6lsrmUMYIoATPtp+\n2sYbSfMKydZ47K0bbwm3ghymr1kbOwtnZzUTtgwqBMQwz9tHGDgUVK51aAA6\nI8EAKRMAib95xnpsOwt6I3Jly3dWAZ9R9ODSCXyN3YArmfgoUKhIwjyoxvR9\nvp3oh7Q0mzhkJcq4Hzo5Oq0UpNg9RXElmPCi+xVwkSu/dscqngKEV42CjnpN\n5hjDcPTGcP13FW3cqYCJZ1oZ/UASy9crTRMkc+en1gjGbLPJTvSnu8SIRg2R\ntpepXSZRAp3LhHDH2A5rM+tM52XyvRuZcTMeCcw4iBP8ppgpcSEupz+enQ5F\nK6og\r\n=TO0z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEn0ew1cEatqbeDNxhgGSQv4pkwrX4VtDiga//Nl0ZxwIhAIo/vp51e2BekR9wdNF+c0XydNoaJqvoheDNOtl/FuHd"}]},"_npmUser":{"name":"guoshengqiang","email":"guoshengqiang@live.com"},"directories":{},"maintainers":[{"name":"guoshengqiang","email":"guoshengqiang@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/os-locale-s-fix_1.0.8-fix-1_1632370443331_0.2739725333800913"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-23T08:00:17.540Z","1.0.8-fix":"2021-08-23T08:00:17.902Z","modified":"2022-05-12T08:32:51.321Z","1.0.8-fix-1":"2021-09-23T04:14:03.467Z"},"maintainers":[{"name":"guoshengqiang","email":"guoshengqiang@live.com"}],"description":"Its a light weight version that minimizes the dependency module of `os-locale`","homepage":"https://github.com/jeffy-g/os-locale-s#readme","keywords":["typescript","javascript","locale","lang","language","system","os","string","user","country","id","identifier","region"],"repository":{"type":"git","url":"git+https://github.com/jeffy-g/os-locale-s.git"},"author":{"name":"jeffy-g","email":"hirotom1107@gmail.com"},"bugs":{"url":"https://github.com/jeffy-g/os-locale-s/issues"},"license":"MIT","readme":"# OS locale detector (os-locale-s)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/jeffy-g/os-locale-s.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/jeffy-g/os-locale-s/context:javascript) ![Node.js CI](https://github.com/jeffy-g/os-locale-s/workflows/Node.js%20CI/badge.svg) ![GitHub](https://img.shields.io/github/license/jeffy-g/os-locale-s?style=flat) \n\n__Its a light weight version that minimizes the dependency module of `os-locale`__\n\n\n> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software))\n\nUseful for localizing your module or app.\n\nPOSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.\n\n## Motivacion\n\nI was creating a module package and needed to detect the **locale**.\n\nAt that time, I found a module `os-locale` that provides the corresponding function in the npm package.\n\nI just wanted to detect locale token such as \"cs\", \"de\", \"es\", \"fr\" etc but  \n`os-locale` installs as many as 27 npm packages, including indirectly dependent modules\n  + e.g - `yarn add os-locale`\n\nI just wanted to detect a simple locale token but thought this was overwork and decided to rewrite the code.\n\nAt the same time, has been migrate to `TypeScript` as well.\n\n> As a result, the number of npm packages installed in `os-locale-s` has been reduced to 3 including `os-locale-s`\n\n\n## Install\n\n```\n$ npm install os-locale-s\n```\n\n## Usage\n\n```js\n// node (commenjs)\nconst { osLocale } = require(\"os-locale-s\");\n(async () => {\n    console.log(await osLocale());\n    //=> 'en-US'\n})();\n```\n\n```ts\n// ECMA module\nimport { osLocale } from \"os-locale-s\";\n(async () => {\n    console.log(await osLocale());\n    //=> 'en-US'\n})();\n```\n## API\n\n### osLocale(options?)\n\nReturns a `Promise` for the locale.\n\n### osLocale.sync(options?)\n\nReturns the locale.\n\n#### options\n\nType: `object`\n\n##### spawn\n\nType: `boolean`\\\nDefault: `true`\n\nSet to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables. (`process.env`)\n\n##### cache\n\nType: `boolean`\\\nDefault: `true`\n\nOnce the locale is detected, its value is retained and reused at the second and subsequent detections.\n\nIf set to `false`, the last held value will be ignored and do locale detection again (and the resulting value is not preserved)\n","readmeFilename":"readme.md"}