Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-locale

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-locale - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

13

index.js

@@ -44,13 +44,14 @@ /*!

Object.defineProperty(request, 'getLocaleFromHeader', {
value: function() {
value: function(multi) {
var accept = this.acceptsLanguages() || '',
reg = /(^|,\s*)([a-z-]+)/gi,
match,
locale;
locales = [],
match;
while ((match = reg.exec(accept))) {
if (!locale) {
locale = match[2];
locales.push(match[2])
if (!multi && locales.length) {
break;
}
}
return locale;
return multi ? locales : locales[0];
}

@@ -57,0 +58,0 @@ });

{
"name": "koa-locale",
"version": "1.1.0",
"version": "1.2.0",
"description": "Get locale variable from query, subdomain, the last domain, accept-languages or cookie for koa.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc