From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/os-locale/readme.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'node_modules/os-locale/readme.md') diff --git a/node_modules/os-locale/readme.md b/node_modules/os-locale/readme.md index b80a0bd0b..7c80d3358 100644 --- a/node_modules/os-locale/readme.md +++ b/node_modules/os-locale/readme.md @@ -1,6 +1,6 @@ # os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale) -> Get the system [locale](http://en.wikipedia.org/wiki/Locale) +> Get the system [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)) Useful for localizing your module or app. @@ -17,9 +17,9 @@ $ npm install --save os-locale ## Usage ```js -var osLocale = require('os-locale'); +const osLocale = require('os-locale'); -osLocale(function (err, locale) { +osLocale().then(locale => { console.log(locale); //=> 'en_US' }); @@ -28,15 +28,21 @@ osLocale(function (err, locale) { ## API -### osLocale([options], callback(error, locale)) +### osLocale([options]) + +Returns a `Promise` for the locale. ### osLocale.sync([options]) Returns the locale. -#### options.spawn +#### options + +Type: `Object` + +##### spawn -Type: `boolean` +Type: `boolean`
Default: `true` Set to `false` to avoid spawning subprocesses and instead only resolve the locale from environment variables. @@ -44,4 +50,4 @@ Set to `false` to avoid spawning subprocesses and instead only resolve the local ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) -- cgit v1.2.3