country-list-js
Advanced tools
Comparing version 3.1.6 to 3.1.7
@@ -70,3 +70,3 @@ 'use strict'; | ||
if (self.cache[prop][val]) | ||
return x(self.cache[prop][val]); | ||
return self.cache[prop][val]; | ||
@@ -138,2 +138,2 @@ return self.cache[prop][val] = Object.keys(self.all) | ||
return this.filter((e, pos) => this.indexOf(e) == pos); | ||
} | ||
} |
{ | ||
"name": "country-list-js", | ||
"version": "3.1.6", | ||
"version": "3.1.7", | ||
"description": "Country list with ISO2, ISO3 code, continent, capital, dialing code", | ||
@@ -18,8 +18,3 @@ "homepage": "https://github.com/i-rocky/country-list-js.git", | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/i-rocky/country-list-js/blob/master/LICENSE" | ||
} | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
@@ -26,0 +21,0 @@ "keywords": [ |
'use strict'; | ||
const expect = require('chai').expect; | ||
const assert = require('assert'); | ||
const ok = require('assert').ok; | ||
@@ -105,2 +106,8 @@ | ||
it('Returns cached results same as original', function() { | ||
var first = country.findByIso3('USA'); | ||
var second = country.findByIso3('USA'); | ||
assert.deepEqual(first, second); | ||
}); | ||
it('Null is returned if not found', function () { | ||
@@ -115,2 +122,2 @@ expect(country.findByIso2('XX')).to.be.equal(undefined); | ||
}); | ||
}); | ||
}); |
724846
3239