New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

locales-detector

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

locales-detector - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/detectors/Detector.js.flow

5

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
## [1.1.1] 2018-10-29
### Fixed
- Slice un-need locales from default transformer
## [1.1.0] 2018-08-15

@@ -5,0 +10,0 @@ ### Changed

2

dist/detectors/index.js

@@ -164,3 +164,3 @@ 'use strict';

if (locales) {
if (typeof locales === 'string') {
return locales.split(',');

@@ -167,0 +167,0 @@ }

@@ -103,3 +103,3 @@ 'use strict';

if (locales) {
if (typeof locales === 'string') {
return locales.split(',');

@@ -106,0 +106,0 @@ }

@@ -290,3 +290,3 @@ import queryString from 'query-string';

value: function transform(locales) {
return [].concat(toConsumableArray(locales.map(function (locale) {
var transformedLocales = [].concat(toConsumableArray(locales.map(function (locale) {
var splitedLocale = locale.split('-');

@@ -303,2 +303,5 @@ return splitedLocale.map(function (value, index) {

}, [])), [this.defaultLocale]);
// slice locales that comes after default locale
return transformedLocales.slice(0, transformedLocales.indexOf(this.defaultLocale) + 1);
}

@@ -462,3 +465,3 @@ }]);

if (locales) {
if (typeof locales === 'string') {
return locales.split(',');

@@ -465,0 +468,0 @@ }

@@ -296,3 +296,3 @@ 'use strict';

value: function transform(locales) {
return [].concat(toConsumableArray(locales.map(function (locale) {
var transformedLocales = [].concat(toConsumableArray(locales.map(function (locale) {
var splitedLocale = locale.split('-');

@@ -309,2 +309,5 @@ return splitedLocale.map(function (value, index) {

}, [])), [this.defaultLocale]);
// slice locales that comes after default locale
return transformedLocales.slice(0, transformedLocales.indexOf(this.defaultLocale) + 1);
}

@@ -468,3 +471,3 @@ }]);

if (locales) {
if (typeof locales === 'string') {
return locales.split(',');

@@ -471,0 +474,0 @@ }

@@ -102,3 +102,3 @@ 'use strict';

value: function transform(locales) {
return [].concat(toConsumableArray(locales.map(function (locale) {
var transformedLocales = [].concat(toConsumableArray(locales.map(function (locale) {
var splitedLocale = locale.split('-');

@@ -115,2 +115,5 @@ return splitedLocale.map(function (value, index) {

}, [])), [this.defaultLocale]);
// slice locales that comes after default locale
return transformedLocales.slice(0, transformedLocales.indexOf(this.defaultLocale) + 1);
}

@@ -117,0 +120,0 @@ }]);

@@ -292,3 +292,3 @@ 'use strict';

value: function transform(locales) {
return [].concat(toConsumableArray(locales.map(function (locale) {
var transformedLocales = [].concat(toConsumableArray(locales.map(function (locale) {
var splitedLocale = locale.split('-');

@@ -305,2 +305,5 @@ return splitedLocale.map(function (value, index) {

}, [])), [this.defaultLocale]);
// slice locales that comes after default locale
return transformedLocales.slice(0, transformedLocales.indexOf(this.defaultLocale) + 1);
}

@@ -307,0 +310,0 @@ }]);

{
"name": "locales-detector",
"version": "1.1.0",
"version": "1.1.1",
"description": "Tool for detecting locales of visitors and transform them.",

@@ -25,10 +25,10 @@ "keywords": [

"@socifi/eslint-config": "^1.10.0",
"@socifi/jest-config": "^1.9.0",
"@socifi/jest-config": "^1.10.0",
"@socifi/rollup-config": "^1.10.0",
"flow-bin": "^0.78.0",
"flow-coverage-report": "^0.5.0",
"flow-typed": "^2.4.0"
"flow-bin": "^0.84.0",
"flow-coverage-report": "^0.6.0",
"flow-typed": "^2.5.1"
},
"dependencies": {
"query-string": "^6.1.0"
"query-string": "^6.2.0"
},

@@ -35,0 +35,0 @@ "scripts": {

@@ -32,3 +32,3 @@ // @flow strict

if (locales) {
if (typeof locales === 'string') {
return locales.split(',');

@@ -35,0 +35,0 @@ }

@@ -26,3 +26,3 @@ // @flow strict

transform(locales: Array<string>): Array<string> {
return [
const transformedLocales = [
...locales.map((locale) => {

@@ -40,3 +40,6 @@ const splitedLocale = locale.split('-');

];
// slice locales that comes after default locale
return transformedLocales.slice(0, transformedLocales.indexOf(this.defaultLocale) + 1);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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