Skip to content

Commit 8959c55

Browse files
authored
Merge pull request #9 from Cloudoki/develop
chore(merge): merge develop into master
2 parents 68fad2b + 29e8978 commit 8959c55

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

package-lock.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
"semantic-release": "^15.13.3",
5252
"semantic-release-cli": "^4.1.0"
5353
},
54-
"dependencies": {
55-
"lodash": "^4.17.11"
56-
},
54+
"dependencies": {},
5755
"config": {
5856
"commitizen": {
5957
"path": "cz-conventional-changelog"

src/lib/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const _ = require('lodash')
21
const data = require('../data.json')
32

43
/**
@@ -7,7 +6,7 @@ const data = require('../data.json')
76
* @return {boolean}
87
*/
98
const validateLocaleCode = (localeCode) => {
10-
return _.findIndex(data, (l) => l.code === localeCode) !== -1
9+
return data.findIndex((l) => l.code === localeCode) !== -1
1110
}
1211

1312
/**
@@ -16,7 +15,7 @@ const validateLocaleCode = (localeCode) => {
1615
* @return {boolean}
1716
*/
1817
const validateLanguageCode = (languageCode) => {
19-
return _.findIndex(data, (l) => l.langCode === languageCode) !== -1
18+
return data.findIndex((l) => l.langCode === languageCode) !== -1
2019
}
2120

2221
/**
@@ -25,7 +24,7 @@ const validateLanguageCode = (languageCode) => {
2524
* @return {string[]} Languages list
2625
*/
2726
const findCountryLanguages = (countryCode) => {
28-
const countryEntries = _.filter(data, (l) => l.countryCode === countryCode)
27+
const countryEntries = data.filter((l) => l.countryCode === countryCode)
2928
const langSet = new Set()
3029

3130
countryEntries.forEach((e, i) => langSet.add(countryEntries[i].langCode))
@@ -39,7 +38,7 @@ const findCountryLanguages = (countryCode) => {
3938
* @return {string[]} Locales list
4039
*/
4140
const findCountryLocales = (countryCode) => {
42-
const countryEntries = _.filter(data, (l) => l.countryCode === countryCode)
41+
const countryEntries = data.filter((l) => l.countryCode === countryCode)
4342
const localeSet = new Set()
4443

4544
countryEntries.forEach((e, i) => localeSet.add(countryEntries[i].code))

0 commit comments

Comments
 (0)