diff --git a/index.js b/index.js index 759e106..6570d55 100644 --- a/index.js +++ b/index.js @@ -95,7 +95,7 @@ const osLocale = mem(async (options = defaultOptions) => { } catch (_) {} return (locale || defaultLocale).replace(/_/, '-'); -}); +}, {cachePromiseRejection: false}); module.exports = osLocale; diff --git a/package.json b/package.json index 70b74e6..9c33f49 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,11 @@ ], "dependencies": { "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.3.0" + "lcid": "^3.0.0", + "mem": "^5.0.0" }, "devDependencies": { - "ava": "^1.4.1", + "ava": "^2.1.0", "import-fresh": "^3.0.0", "tsd": "^0.7.2", "xo": "^0.24.0" diff --git a/readme.md b/readme.md index 59f181e..f03980f 100644 --- a/readme.md +++ b/readme.md @@ -28,11 +28,11 @@ const osLocale = require('os-locale'); ## API -### osLocale([options]) +### osLocale(options?) Returns a `Promise` for the locale. -### osLocale.sync([options]) +### osLocale.sync(options?) Returns the locale.