kommunkoder.js
/*
* kommunkoder - v1.1.1
* Collection of all municipalities in Sweden with corresponding county and municipality codes (kommunkoder).
* https://github.com/simon-johansson/kommunkoder
* by Simon Johansson <mail@simon-johansson.com>
* MIT License
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.kommunkoder = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports=[{
"code": "0114",
"municipality": "Upplands Väsby",
"county": "Stockholms län"
}, {
"code": "0115",
"municipality": "Vallentuna",
"county": "Stockholms län"
}, {
"code": "0117",
"municipality": "Österåker",
"county": "Stockholms län"
}, {
"code": "0120",
"municipality": "Värmdö",
"county": "Stockholms län"
}, {
"code": "0123",
"municipality": "Järfälla",
"county": "Stockholms län"
}, {
"code": "0125",
"municipality": "Ekerö",
"county": "Stockholms län"
}, {
"code": "0126",
"municipality": "Huddinge",
"county": "Stockholms län"
}, {
"code": "0127",
"municipality": "Botkyrka",
"county": "Stockholms län"
}, {
"code": "0128",
"municipality": "Salem",
"county": "Stockholms län"
}, {
"code": "0136",
"municipality": "Haninge",
"county": "Stockholms län"
}, {
"code": "0138",
"municipality": "Tyresö",
"county": "Stockholms län"
}, {
"code": "0139",
"municipality": "Upplands-Bro",
"county": "Stockholms län"
}, {
"code": "0140",
"municipality": "Nykvarn",
"county": "Stockholms län"
}, {
"code": "0160",
"municipality": "Täby",
"county": "Stockholms län"
}, {
"code": "0162",
"municipality": "Danderyd",
"county": "Stockholms län"
}, {
"code": "0163",
"municipality": "Sollentuna",
"county": "Stockholms län"
}, {
"code": "0180",
"municipality": "Stockholm",
"county": "Stockholms län"
}, {
"code": "0181",
"municipality": "Södertälje",
"county": "Stockholms län"
}, {
"code": "0182",
"municipality": "Nacka",
"county": "Stockholms län"
}, {
"code": "0183",
"municipality": "Sundbyberg",
"county": "Stockholms län"
}, {
"code": "0184",
"municipality": "Solna",
"county": "Stockholms län"
}, {
"code": "0186",
"municipality": "Lidingö",
"county": "Stockholms län"
}, {
"code": "0187",
"municipality": "Vaxholm",
"county": "Stockholms län"
}, {
"code": "0188",
"municipality": "Norrtälje",
"county": "Stockholms län"
}, {
"code": "0191",
"municipality": "Sigtuna",
"county": "Stockholms län"
}, {
"code": "0192",
"municipality": "Nynäshamn",
"county": "Stockholms län"
}, {
"code": "0305",
"municipality": "Håbo",
"county": "Uppsala län"
}, {
"code": "0319",
"municipality": "Älvkarleby",
"county": "Uppsala län"
}, {
"code": "0330",
"municipality": "Knivsta",
"county": "Uppsala län"
}, {
"code": "0331",
"municipality": "Heby",
"county": "Uppsala län"
}, {
"code": "0360",
"municipality": "Tierp",
"county": "Uppsala län"
}, {
"code": "0380",
"municipality": "Uppsala",
"county": "Uppsala län"
}, {
"code": "0381",
"municipality": "Enköping",
"county": "Uppsala län"
}, {
"code": "0382",
"municipality": "Östhammar",
"county": "Uppsala län"
}, {
"code": "0428",
"municipality": "Vingåker",
"county": "Södermanlands län"
}, {
"code": "0461",
"municipality": "Gnesta",
"county": "Södermanlands län"
}, {
"code": "0480",
"municipality": "Nyköping",
"county": "Södermanlands län"
}, {
"code": "0481",
"municipality": "Oxelösund",
"county": "Södermanlands län"
}, {
"code": "0482",
"municipality": "Flen",
"county": "Södermanlands län"
}, {
"code": "0483",
"municipality": "Katrineholm",
"county": "Södermanlands län"
}, {
"code": "0484",
"municipality": "Eskilstuna",
"county": "Södermanlands län"
}, {
"code": "0486",
"municipality": "Strängnäs",
"county": "Södermanlands län"
}, {
"code": "0488",
"municipality": "Trosa",
"county": "Södermanlands län"
}, {
"code": "0509",
"municipality": "Ödeshög",
"county": "Östergötlands län"
}, {
"code": "0512",
"municipality": "Ydre",
"county": "Östergötlands län"
}, {
"code": "0513",
"municipality": "Kinda",
"county": "Östergötlands län"
}, {
"code": "0560",
"municipality": "Boxholm",
"county": "Östergötlands län"
}, {
"code": "0561",
"municipality": "Åtvidaberg",
"county": "Östergötlands län"
}, {
"code": "0562",
"municipality": "Finspång",
"county": "Östergötlands län"
}, {
"code": "0563",
"municipality": "Valdemarsvik",
"county": "Östergötlands län"
}, {
"code": "0580",
"municipality": "Linköping",
"county": "Östergötlands län"
}, {
"code": "0581",
"municipality": "Norrköping",
"county": "Östergötlands län"
}, {
"code": "0582",
"municipality": "Söderköping",
"county": "Östergötlands län"
}, {
"code": "0583",
"municipality": "Motala",
"county": "Östergötlands län"
}, {
"code": "0584",
"municipality": "Vadstena",
"county": "Östergötlands län"
}, {
"code": "0586",
"municipality": "Mjölby",
"county": "Östergötlands län"
}, {
"code": "0604",
"municipality": "Aneby",
"county": "Jönköpings län"
}, {
"code": "0617",
"municipality": "Gnosjö",
"county": "Jönköpings län"
}, {
"code": "0642",
"municipality": "Mullsjö",
"county": "Jönköpings län"
}, {
"code": "0643",
"municipality": "Habo",
"county": "Jönköpings län"
}, {
"code": "0662",
"municipality": "Gislaved",
"county": "Jönköpings län"
}, {
"code": "0665",
"municipality": "Vaggeryd",
"county": "Jönköpings län"
}, {
"code": "0680",
"municipality": "Jönköping",
"county": "Jönköpings län"
}, {
"code": "0682",
"municipality": "Nässjö",
"county": "Jönköpings län"
}, {
"code": "0683",
"municipality": "Värnamo",
"county": "Jönköpings län"
}, {
"code": "0684",
"municipality": "Sävsjö",
"county": "Jönköpings län"
}, {
"code": "0685",
"municipality": "Vetlanda",
"county": "Jönköpings län"
}, {
"code": "0686",
"municipality": "Eksjö",
"county": "Jönköpings län"
}, {
"code": "0687",
"municipality": "Tranås",
"county": "Jönköpings län"
}, {
"code": "0760",
"municipality": "Uppvidinge",
"county": "Kronobergs län"
}, {
"code": "0761",
"municipality": "Lessebo",
"county": "Kronobergs län"
}, {
"code": "0763",
"municipality": "Tingsryd",
"county": "Kronobergs län"
}, {
"code": "0764",
"municipality": "Alvesta",
"county": "Kronobergs län"
}, {
"code": "0765",
"municipality": "Älmhult",
"county": "Kronobergs län"
}, {
"code": "0767",
"municipality": "Markaryd",
"county": "Kronobergs län"
}, {
"code": "0780",
"municipality": "Växjö",
"county": "Kronobergs län"
}, {
"code": "0781",
"municipality": "Ljungby",
"county": "Kronobergs län"
}, {
"code": "0821",
"municipality": "Högsby",
"county": "Kalmar län"
}, {
"code": "0834",
"municipality": "Torsås",
"county": "Kalmar län"
}, {
"code": "0840",
"municipality": "Mörbylånga",
"county": "Kalmar län"
}, {
"code": "0860",
"municipality": "Hultsfred",
"county": "Kalmar län"
}, {
"code": "0861",
"municipality": "Mönsterås",
"county": "Kalmar län"
}, {
"code": "0862",
"municipality": "Emmaboda",
"county": "Kalmar län"
}, {
"code": "0880",
"municipality": "Kalmar",
"county": "Kalmar län"
}, {
"code": "0881",
"municipality": "Nybro",
"county": "Kalmar län"
}, {
"code": "0882",
"municipality": "Oskarshamn",
"county": "Kalmar län"
}, {
"code": "0883",
"municipality": "Västervik",
"county": "Kalmar län"
}, {
"code": "0884",
"municipality": "Vimmerby",
"county": "Kalmar län"
}, {
"code": "0885",
"municipality": "Borgholm",
"county": "Kalmar län"
}, {
"code": "0980",
"municipality": "Gotland",
"county": "Gotlands län"
}, {
"code": "1060",
"municipality": "Olofström",
"county": "Blekinge län"
}, {
"code": "1080",
"municipality": "Karlskrona",
"county": "Blekinge län"
}, {
"code": "1081",
"municipality": "Ronneby",
"county": "Blekinge län"
}, {
"code": "1082",
"municipality": "Karlshamn",
"county": "Blekinge län"
}, {
"code": "1083",
"municipality": "Sölvesborg",
"county": "Blekinge län"
}, {
"code": "1214",
"municipality": "Svalöv",
"county": "Skåne län"
}, {
"code": "1230",
"municipality": "Staffanstorp",
"county": "Skåne län"
}, {
"code": "1231",
"municipality": "Burlöv",
"county": "Skåne län"
}, {
"code": "1233",
"municipality": "Vellinge",
"county": "Skåne län"
}, {
"code": "1256",
"municipality": "Östra Göinge",
"county": "Skåne län"
}, {
"code": "1257",
"municipality": "Örkelljunga",
"county": "Skåne län"
}, {
"code": "1260",
"municipality": "Bjuv",
"county": "Skåne län"
}, {
"code": "1261",
"municipality": "Kävlinge",
"county": "Skåne län"
}, {
"code": "1262",
"municipality": "Lomma",
"county": "Skåne län"
}, {
"code": "1263",
"municipality": "Svedala",
"county": "Skåne län"
}, {
"code": "1264",
"municipality": "Skurup",
"county": "Skåne län"
}, {
"code": "1265",
"municipality": "Sjöbo",
"county": "Skåne län"
}, {
"code": "1266",
"municipality": "Hörby",
"county": "Skåne län"
}, {
"code": "1267",
"municipality": "Höör",
"county": "Skåne län"
}, {
"code": "1270",
"municipality": "Tomelilla",
"county": "Skåne län"
}, {
"code": "1272",
"municipality": "Bromölla",
"county": "Skåne län"
}, {
"code": "1273",
"municipality": "Osby",
"county": "Skåne län"
}, {
"code": "1275",
"municipality": "Perstorp",
"county": "Skåne län"
}, {
"code": "1276",
"municipality": "Klippan",
"county": "Skåne län"
}, {
"code": "1277",
"municipality": "Åstorp",
"county": "Skåne län"
}, {
"code": "1278",
"municipality": "Båstad",
"county": "Skåne län"
}, {
"code": "1280",
"municipality": "Malmö",
"county": "Skåne län"
}, {
"code": "1281",
"municipality": "Lund",
"county": "Skåne län"
}, {
"code": "1282",
"municipality": "Landskrona",
"county": "Skåne län"
}, {
"code": "1283",
"municipality": "Helsingborg",
"county": "Skåne län"
}, {
"code": "1284",
"municipality": "Höganäs",
"county": "Skåne län"
}, {
"code": "1285",
"municipality": "Eslöv",
"county": "Skåne län"
}, {
"code": "1286",
"municipality": "Ystad",
"county": "Skåne län"
}, {
"code": "1287",
"municipality": "Trelleborg",
"county": "Skåne län"
}, {
"code": "1290",
"municipality": "Kristianstad",
"county": "Skåne län"
}, {
"code": "1291",
"municipality": "Simrishamn",
"county": "Skåne län"
}, {
"code": "1292",
"municipality": "Ängelholm",
"county": "Skåne län"
}, {
"code": "1293",
"municipality": "Hässleholm",
"county": "Skåne län"
}, {
"code": "1315",
"municipality": "Hylte",
"county": "Hallands län"
}, {
"code": "1380",
"municipality": "Halmstad",
"county": "Hallands län"
}, {
"code": "1381",
"municipality": "Laholm",
"county": "Hallands län"
}, {
"code": "1382",
"municipality": "Falkenberg",
"county": "Hallands län"
}, {
"code": "1383",
"municipality": "Varberg",
"county": "Hallands län"
}, {
"code": "1384",
"municipality": "Kungsbacka",
"county": "Hallands län"
}, {
"code": "1401",
"municipality": "Härryda",
"county": "Västra Götalands län"
}, {
"code": "1402",
"municipality": "Partille",
"county": "Västra Götalands län"
}, {
"code": "1407",
"municipality": "Öckerö",
"county": "Västra Götalands län"
}, {
"code": "1415",
"municipality": "Stenungsund",
"county": "Västra Götalands län"
}, {
"code": "1419",
"municipality": "Tjörn",
"county": "Västra Götalands län"
}, {
"code": "1421",
"municipality": "Orust",
"county": "Västra Götalands län"
}, {
"code": "1427",
"municipality": "Sotenäs",
"county": "Västra Götalands län"
}, {
"code": "1430",
"municipality": "Munkedal",
"county": "Västra Götalands län"
}, {
"code": "1435",
"municipality": "Tanum",
"county": "Västra Götalands län"
}, {
"code": "1438",
"municipality": "Dals-Ed",
"county": "Västra Götalands län"
}, {
"code": "1439",
"municipality": "Färgelanda",
"county": "Västra Götalands län"
}, {
"code": "1440",
"municipality": "Ale",
"county": "Västra Götalands län"
}, {
"code": "1441",
"municipality": "Lerum",
"county": "Västra Götalands län"
}, {
"code": "1442",
"municipality": "Vårgårda",
"county": "Västra Götalands län"
}, {
"code": "1443",
"municipality": "Bollebygd",
"county": "Västra Götalands län"
}, {
"code": "1444",
"municipality": "Grästorp",
"county": "Västra Götalands län"
}, {
"code": "1445",
"municipality": "Essunga",
"county": "Västra Götalands län"
}, {
"code": "1446",
"municipality": "Karlsborg",
"county": "Västra Götalands län"
}, {
"code": "1447",
"municipality": "Gullspång",
"county": "Västra Götalands län"
}, {
"code": "1452",
"municipality": "Tranemo",
"county": "Västra Götalands län"
}, {
"code": "1460",
"municipality": "Bengtsfors",
"county": "Västra Götalands län"
}, {
"code": "1461",
"municipality": "Mellerud",
"county": "Västra Götalands län"
}, {
"code": "1462",
"municipality": "Lilla Edet",
"county": "Västra Götalands län"
}, {
"code": "1463",
"municipality": "Mark",
"county": "Västra Götalands län"
}, {
"code": "1465",
"municipality": "Svenljunga",
"county": "Västra Götalands län"
}, {
"code": "1466",
"municipality": "Herrljunga",
"county": "Västra Götalands län"
}, {
"code": "1470",
"municipality": "Vara",
"county": "Västra Götalands län"
}, {
"code": "1471",
"municipality": "Götene",
"county": "Västra Götalands län"
}, {
"code": "1472",
"municipality": "Tibro",
"county": "Västra Götalands län"
}, {
"code": "1473",
"municipality": "Töreboda",
"county": "Västra Götalands län"
}, {
"code": "1480",
"municipality": "Göteborg",
"county": "Västra Götalands län"
}, {
"code": "1481",
"municipality": "Mölndal",
"county": "Västra Götalands län"
}, {
"code": "1482",
"municipality": "Kungälv",
"county": "Västra Götalands län"
}, {
"code": "1484",
"municipality": "Lysekil",
"county": "Västra Götalands län"
}, {
"code": "1485",
"municipality": "Uddevalla",
"county": "Västra Götalands län"
}, {
"code": "1486",
"municipality": "Strömstad",
"county": "Västra Götalands län"
}, {
"code": "1487",
"municipality": "Vänersborg",
"county": "Västra Götalands län"
}, {
"code": "1488",
"municipality": "Trollhättan",
"county": "Västra Götalands län"
}, {
"code": "1489",
"municipality": "Alingsås",
"county": "Västra Götalands län"
}, {
"code": "1490",
"municipality": "Borås",
"county": "Västra Götalands län"
}, {
"code": "1491",
"municipality": "Ulricehamn",
"county": "Västra Götalands län"
}, {
"code": "1492",
"municipality": "Åmål",
"county": "Västra Götalands län"
}, {
"code": "1493",
"municipality": "Mariestad",
"county": "Västra Götalands län"
}, {
"code": "1494",
"municipality": "Lidköping",
"county": "Västra Götalands län"
}, {
"code": "1495",
"municipality": "Skara",
"county": "Västra Götalands län"
}, {
"code": "1496",
"municipality": "Skövde",
"county": "Västra Götalands län"
}, {
"code": "1497",
"municipality": "Hjo",
"county": "Västra Götalands län"
}, {
"code": "1498",
"municipality": "Tidaholm",
"county": "Västra Götalands län"
}, {
"code": "1499",
"municipality": "Falköping",
"county": "Västra Götalands län"
}, {
"code": "1715",
"municipality": "Kil",
"county": "Värmlands län"
}, {
"code": "1730",
"municipality": "Eda",
"county": "Värmlands län"
}, {
"code": "1737",
"municipality": "Torsby",
"county": "Värmlands län"
}, {
"code": "1760",
"municipality": "Storfors",
"county": "Värmlands län"
}, {
"code": "1761",
"municipality": "Hammarö",
"county": "Värmlands län"
}, {
"code": "1762",
"municipality": "Munkfors",
"county": "Värmlands län"
}, {
"code": "1763",
"municipality": "Forshaga",
"county": "Värmlands län"
}, {
"code": "1764",
"municipality": "Grums",
"county": "Värmlands län"
}, {
"code": "1765",
"municipality": "Årjäng",
"county": "Värmlands län"
}, {
"code": "1766",
"municipality": "Sunne",
"county": "Värmlands län"
}, {
"code": "1780",
"municipality": "Karlstad",
"county": "Värmlands län"
}, {
"code": "1781",
"municipality": "Kristinehamn",
"county": "Värmlands län"
}, {
"code": "1782",
"municipality": "Filipstad",
"county": "Värmlands län"
}, {
"code": "1783",
"municipality": "Hagfors",
"county": "Värmlands län"
}, {
"code": "1784",
"municipality": "Arvika",
"county": "Värmlands län"
}, {
"code": "1785",
"municipality": "Säffle",
"county": "Värmlands län"
}, {
"code": "1814",
"municipality": "Lekeberg",
"county": "Örebro län"
}, {
"code": "1860",
"municipality": "Laxå",
"county": "Örebro län"
}, {
"code": "1861",
"municipality": "Hallsberg",
"county": "Örebro län"
}, {
"code": "1862",
"municipality": "Degerfors",
"county": "Örebro län"
}, {
"code": "1863",
"municipality": "Hällefors",
"county": "Örebro län"
}, {
"code": "1864",
"municipality": "Ljusnarsberg",
"county": "Örebro län"
}, {
"code": "1880",
"municipality": "Örebro",
"county": "Örebro län"
}, {
"code": "1881",
"municipality": "Kumla",
"county": "Örebro län"
}, {
"code": "1882",
"municipality": "Askersund",
"county": "Örebro län"
}, {
"code": "1883",
"municipality": "Karlskoga",
"county": "Örebro län"
}, {
"code": "1884",
"municipality": "Nora",
"county": "Örebro län"
}, {
"code": "1885",
"municipality": "Lindesberg",
"county": "Örebro län"
}, {
"code": "1904",
"municipality": "Skinnskatteberg",
"county": "Västmanlands län"
}, {
"code": "1907",
"municipality": "Surahammar",
"county": "Västmanlands län"
}, {
"code": "1960",
"municipality": "Kungsör",
"county": "Västmanlands län"
}, {
"code": "1961",
"municipality": "Hallstahammar",
"county": "Västmanlands län"
}, {
"code": "1962",
"municipality": "Norberg",
"county": "Västmanlands län"
}, {
"code": "1980",
"municipality": "Västerås",
"county": "Västmanlands län"
}, {
"code": "1981",
"municipality": "Sala",
"county": "Västmanlands län"
}, {
"code": "1982",
"municipality": "Fagersta",
"county": "Västmanlands län"
}, {
"code": "1983",
"municipality": "Köping",
"county": "Västmanlands län"
}, {
"code": "1984",
"municipality": "Arboga",
"county": "Västmanlands län"
}, {
"code": "2021",
"municipality": "Vansbro",
"county": "Dalarnas län"
}, {
"code": "2023",
"municipality": "Malung-Sälen",
"county": "Dalarnas län"
}, {
"code": "2026",
"municipality": "Gagnef",
"county": "Dalarnas län"
}, {
"code": "2029",
"municipality": "Leksand",
"county": "Dalarnas län"
}, {
"code": "2031",
"municipality": "Rättvik",
"county": "Dalarnas län"
}, {
"code": "2034",
"municipality": "Orsa",
"county": "Dalarnas län"
}, {
"code": "2039",
"municipality": "Älvdalen",
"county": "Dalarnas län"
}, {
"code": "2061",
"municipality": "Smedjebacken",
"county": "Dalarnas län"
}, {
"code": "2062",
"municipality": "Mora",
"county": "Dalarnas län"
}, {
"code": "2080",
"municipality": "Falun",
"county": "Dalarnas län"
}, {
"code": "2081",
"municipality": "Borlänge",
"county": "Dalarnas län"
}, {
"code": "2082",
"municipality": "Säter",
"county": "Dalarnas län"
}, {
"code": "2083",
"municipality": "Hedemora",
"county": "Dalarnas län"
}, {
"code": "2084",
"municipality": "Avesta",
"county": "Dalarnas län"
}, {
"code": "2085",
"municipality": "Ludvika",
"county": "Dalarnas län"
}, {
"code": "2101",
"municipality": "Ockelbo",
"county": "Gävleborgs län"
}, {
"code": "2104",
"municipality": "Hofors",
"county": "Gävleborgs län"
}, {
"code": "2121",
"municipality": "Ovanåker",
"county": "Gävleborgs län"
}, {
"code": "2132",
"municipality": "Nordanstig",
"county": "Gävleborgs län"
}, {
"code": "2161",
"municipality": "Ljusdal",
"county": "Gävleborgs län"
}, {
"code": "2180",
"municipality": "Gävle",
"county": "Gävleborgs län"
}, {
"code": "2181",
"municipality": "Sandviken",
"county": "Gävleborgs län"
}, {
"code": "2182",
"municipality": "Söderhamn",
"county": "Gävleborgs län"
}, {
"code": "2183",
"municipality": "Bollnäs",
"county": "Gävleborgs län"
}, {
"code": "2184",
"municipality": "Hudiksvall",
"county": "Gävleborgs län"
}, {
"code": "2260",
"municipality": "Ånge",
"county": "Västernorrlands län"
}, {
"code": "2262",
"municipality": "Timrå",
"county": "Västernorrlands län"
}, {
"code": "2280",
"municipality": "Härnösand",
"county": "Västernorrlands län"
}, {
"code": "2281",
"municipality": "Sundsvall",
"county": "Västernorrlands län"
}, {
"code": "2282",
"municipality": "Kramfors",
"county": "Västernorrlands län"
}, {
"code": "2283",
"municipality": "Sollefteå",
"county": "Västernorrlands län"
}, {
"code": "2284",
"municipality": "Örnsköldsvik",
"county": "Västernorrlands län"
}, {
"code": "2303",
"municipality": "Ragunda",
"county": "Jämtlands län"
}, {
"code": "2305",
"municipality": "Bräcke",
"county": "Jämtlands län"
}, {
"code": "2309",
"municipality": "Krokom",
"county": "Jämtlands län"
}, {
"code": "2313",
"municipality": "Strömsund",
"county": "Jämtlands län"
}, {
"code": "2321",
"municipality": "Åre",
"county": "Jämtlands län"
}, {
"code": "2326",
"municipality": "Berg",
"county": "Jämtlands län"
}, {
"code": "2361",
"municipality": "Härjedalen",
"county": "Jämtlands län"
}, {
"code": "2380",
"municipality": "Östersund",
"county": "Jämtlands län"
}, {
"code": "2401",
"municipality": "Nordmaling",
"county": "Västerbottens län"
}, {
"code": "2403",
"municipality": "Bjurholm",
"county": "Västerbottens län"
}, {
"code": "2404",
"municipality": "Vindeln",
"county": "Västerbottens län"
}, {
"code": "2409",
"municipality": "Robertsfors",
"county": "Västerbottens län"
}, {
"code": "2417",
"municipality": "Norsjö",
"county": "Västerbottens län"
}, {
"code": "2418",
"municipality": "Malå",
"county": "Västerbottens län"
}, {
"code": "2421",
"municipality": "Storuman",
"county": "Västerbottens län"
}, {
"code": "2422",
"municipality": "Sorsele",
"county": "Västerbottens län"
}, {
"code": "2425",
"municipality": "Dorotea",
"county": "Västerbottens län"
}, {
"code": "2460",
"municipality": "Vännäs",
"county": "Västerbottens län"
}, {
"code": "2462",
"municipality": "Vilhelmina",
"county": "Västerbottens län"
}, {
"code": "2463",
"municipality": "Åsele",
"county": "Västerbottens län"
}, {
"code": "2480",
"municipality": "Umeå",
"county": "Västerbottens län"
}, {
"code": "2481",
"municipality": "Lycksele",
"county": "Västerbottens län"
}, {
"code": "2482",
"municipality": "Skellefteå",
"county": "Västerbottens län"
}, {
"code": "2505",
"municipality": "Arvidsjaur",
"county": "Norrbottens län"
}, {
"code": "2506",
"municipality": "Arjeplog",
"county": "Norrbottens län"
}, {
"code": "2510",
"municipality": "Jokkmokk",
"county": "Norrbottens län"
}, {
"code": "2513",
"municipality": "Överkalix",
"county": "Norrbottens län"
}, {
"code": "2514",
"municipality": "Kalix",
"county": "Norrbottens län"
}, {
"code": "2518",
"municipality": "Övertorneå",
"county": "Norrbottens län"
}, {
"code": "2521",
"municipality": "Pajala",
"county": "Norrbottens län"
}, {
"code": "2523",
"municipality": "Gällivare",
"county": "Norrbottens län"
}, {
"code": "2560",
"municipality": "Älvsbyn",
"county": "Norrbottens län"
}, {
"code": "2580",
"municipality": "Luleå",
"county": "Norrbottens län"
}, {
"code": "2581",
"municipality": "Piteå",
"county": "Norrbottens län"
}, {
"code": "2582",
"municipality": "Boden",
"county": "Norrbottens län"
}, {
"code": "2583",
"municipality": "Haparanda",
"county": "Norrbottens län"
}, {
"code": "2584",
"municipality": "Kiruna",
"county": "Norrbottens län"
}]
},{}],2:[function(require,module,exports){
'use strict';
var isUndefined = require('lodash/lang/isUndefined');
var isArray = require('lodash/lang/isArray');
var isNumber = require('lodash/lang/isNumber');
var isString = require('lodash/lang/isString');
var filter = require('lodash/collection/filter');
var first = require('lodash/array/first');
var data = require('./data');
function iterateOverQuery(querryArray) {
return querryArray.map(function(el) {
return get(el);
});
}
function stringifyQuery(queryNumber) {
return queryNumber.toString();
}
function objectifyQuery(queryString) {
var query = queryString.length <= 3 ? '0' + queryString : queryString;
return { code: query };
}
function get (query) {
if (isUndefined(query)) {
return data;
} if (isArray(query)) {
return iterateOverQuery(query);
} if (isNumber(query)) {
query = stringifyQuery(query);
} if (isString(query)) {
query = objectifyQuery(query);
}
var result = filter(data, query);
return result.length > 1 ? result : first(result);
}
module.exports = get;
},{"./data":1,"lodash/array/first":3,"lodash/collection/filter":4,"lodash/lang/isArray":32,"lodash/lang/isNumber":34,"lodash/lang/isString":36,"lodash/lang/isUndefined":38}],3:[function(require,module,exports){
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @alias head
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.first([1, 2, 3]);
* // => 1
*
* _.first([]);
* // => undefined
*/
function first(array) {
return array ? array[0] : undefined;
}
module.exports = first;
},{}],4:[function(require,module,exports){
var arrayFilter = require('../internal/arrayFilter'),
baseCallback = require('../internal/baseCallback'),
baseFilter = require('../internal/baseFilter'),
isArray = require('../lang/isArray');
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is bound to `thisArg` and
* invoked with three arguments; (value, index|key, collection).
*
* If a property name is provided for `predicate` the created `_.property`
* style callback returns the property value of the given element.
*
* If a value is also provided for `thisArg` the created `_.matchesProperty`
* style callback returns `true` for elements that have a matching property
* value, else `false`.
*
* If an object is provided for `predicate` the created `_.matches` style
* callback returns `true` for elements that have the properties of the given
* object, else `false`.
*
* @static
* @memberOf _
* @alias select
* @category Collection
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function|Object|string} [predicate=_.identity] The function invoked
* per iteration.
* @param {*} [thisArg] The `this` binding of `predicate`.
* @returns {Array} Returns the new filtered array.
* @example
*
* _.filter([4, 5, 6], function(n) {
* return n % 2 == 0;
* });
* // => [4, 6]
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* // using the `_.matches` callback shorthand
* _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
* // => ['barney']
*
* // using the `_.matchesProperty` callback shorthand
* _.pluck(_.filter(users, 'active', false), 'user');
* // => ['fred']
*
* // using the `_.property` callback shorthand
* _.pluck(_.filter(users, 'active'), 'user');
* // => ['barney']
*/
function filter(collection, predicate, thisArg) {
var func = isArray(collection) ? arrayFilter : baseFilter;
predicate = baseCallback(predicate, thisArg, 3);
return func(collection, predicate);
}
module.exports = filter;
},{"../internal/arrayFilter":5,"../internal/baseCallback":6,"../internal/baseFilter":8,"../lang/isArray":32}],5:[function(require,module,exports){
/**
* A specialized version of `_.filter` for arrays without support for callback
* shorthands or `this` binding.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array.length,
resIndex = -1,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[++resIndex] = value;
}
}
return result;
}
module.exports = arrayFilter;
},{}],6:[function(require,module,exports){
var baseMatches = require('./baseMatches'),
baseMatchesProperty = require('./baseMatchesProperty'),
baseProperty = require('./baseProperty'),
bindCallback = require('./bindCallback'),
identity = require('../utility/identity'),
isBindable = require('./isBindable');
/**
* The base implementation of `_.callback` which supports specifying the
* number of arguments to provide to `func`.
*
* @private
* @param {*} [func=_.identity] The value to convert to a callback.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {number} [argCount] The number of arguments to provide to `func`.
* @returns {Function} Returns the callback.
*/
function baseCallback(func, thisArg, argCount) {
var type = typeof func;
if (type == 'function') {
return (typeof thisArg != 'undefined' && isBindable(func))
? bindCallback(func, thisArg, argCount)
: func;
}
if (func == null) {
return identity;
}
if (type == 'object') {
return baseMatches(func);
}
return typeof thisArg == 'undefined'
? baseProperty(func + '')
: baseMatchesProperty(func + '', thisArg);
}
module.exports = baseCallback;
},{"../utility/identity":43,"./baseMatches":14,"./baseMatchesProperty":15,"./baseProperty":16,"./bindCallback":19,"./isBindable":23}],7:[function(require,module,exports){
var baseForOwn = require('./baseForOwn'),
isLength = require('./isLength'),
toObject = require('./toObject');
/**
* The base implementation of `_.forEach` without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object|string} Returns `collection`.
*/
function baseEach(collection, iteratee) {
var length = collection ? collection.length : 0;
if (!isLength(length)) {
return baseForOwn(collection, iteratee);
}
var index = -1,
iterable = toObject(collection);
while (++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
}
module.exports = baseEach;
},{"./baseForOwn":10,"./isLength":25,"./toObject":30}],8:[function(require,module,exports){
var baseEach = require('./baseEach');
/**
* The base implementation of `_.filter` without support for callback
* shorthands or `this` binding.
*
* @private
* @param {Array|Object|string} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
module.exports = baseFilter;
},{"./baseEach":7}],9:[function(require,module,exports){
var toObject = require('./toObject');
/**
* The base implementation of `baseForIn` and `baseForOwn` which iterates
* over `object` properties returned by `keysFunc` invoking `iteratee` for
* each property. Iterator functions may exit iteration early by explicitly
* returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
function baseFor(object, iteratee, keysFunc) {
var index = -1,
iterable = toObject(object),
props = keysFunc(object),
length = props.length;
while (++index < length) {
var key = props[index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
}
module.exports = baseFor;
},{"./toObject":30}],10:[function(require,module,exports){
var baseFor = require('./baseFor'),
keys = require('../object/keys');
/**
* The base implementation of `_.forOwn` without support for callback
* shorthands and `this` binding.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
},{"../object/keys":39,"./baseFor":9}],11:[function(require,module,exports){
var baseIsEqualDeep = require('./baseIsEqualDeep');
/**
* The base implementation of `_.isEqual` without support for `this` binding
* `customizer` functions.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparing values.
* @param {boolean} [isWhere] Specify performing partial comparisons.
* @param {Array} [stackA] Tracks traversed `value` objects.
* @param {Array} [stackB] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) {
// Exit early for identical values.
if (value === other) {
// Treat `+0` vs. `-0` as not equal.
return value !== 0 || (1 / value == 1 / other);
}
var valType = typeof value,
othType = typeof other;
// Exit early for unlike primitive values.
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
value == null || other == null) {
// Return `false` unless both values are `NaN`.
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB);
}
module.exports = baseIsEqual;
},{"./baseIsEqualDeep":12}],12:[function(require,module,exports){
var equalArrays = require('./equalArrays'),
equalByTag = require('./equalByTag'),
equalObjects = require('./equalObjects'),
isArray = require('../lang/isArray'),
isTypedArray = require('../lang/isTypedArray');
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparing objects.
* @param {boolean} [isWhere] Specify performing partial comparisons.
* @param {Array} [stackA=[]] Tracks traversed `value` objects.
* @param {Array} [stackB=[]] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackB) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
if (!objIsArr) {
objTag = objToString.call(object);
if (objTag == argsTag) {
objTag = objectTag;
} else if (objTag != objectTag) {
objIsArr = isTypedArray(object);
}
}
if (!othIsArr) {
othTag = objToString.call(other);
if (othTag == argsTag) {
othTag = objectTag;
} else if (othTag != objectTag) {
othIsArr = isTypedArray(other);
}
}
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && !(objIsArr || objIsObj)) {
return equalByTag(object, other, objTag);
}
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (valWrapped || othWrapped) {
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isWhere, stackA, stackB);
}
if (!isSameTag) {
return false;
}
// Assume cyclic values are equal.
// For more information on detecting circular references see https://es5.github.io/#JO.
stackA || (stackA = []);
stackB || (stackB = []);
var length = stackA.length;
while (length--) {
if (stackA[length] == object) {
return stackB[length] == other;
}
}
// Add `object` and `other` to the stack of traversed objects.
stackA.push(object);
stackB.push(other);
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isWhere, stackA, stackB);
stackA.pop();
stackB.pop();
return result;
}
module.exports = baseIsEqualDeep;
},{"../lang/isArray":32,"../lang/isTypedArray":37,"./equalArrays":20,"./equalByTag":21,"./equalObjects":22}],13:[function(require,module,exports){
var baseIsEqual = require('./baseIsEqual');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.isMatch` without support for callback
* shorthands or `this` binding.
*
* @private
* @param {Object} object The object to inspect.
* @param {Array} props The source property names to match.
* @param {Array} values The source values to match.
* @param {Array} strictCompareFlags Strict comparison flags for source values.
* @param {Function} [customizer] The function to customize comparing objects.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
var length = props.length;
if (object == null) {
return !length;
}
var index = -1,
noCustomizer = !customizer;
while (++index < length) {
if ((noCustomizer && strictCompareFlags[index])
? values[index] !== object[props[index]]
: !hasOwnProperty.call(object, props[index])
) {
return false;
}
}
index = -1;
while (++index < length) {
var key = props[index];
if (noCustomizer && strictCompareFlags[index]) {
var result = hasOwnProperty.call(object, key);
} else {
var objValue = object[key],
srcValue = values[index];
result = customizer ? customizer(objValue, srcValue, key) : undefined;
if (typeof result == 'undefined') {
result = baseIsEqual(srcValue, objValue, customizer, true);
}
}
if (!result) {
return false;
}
}
return true;
}
module.exports = baseIsMatch;
},{"./baseIsEqual":11}],14:[function(require,module,exports){
var baseIsMatch = require('./baseIsMatch'),
isStrictComparable = require('./isStrictComparable'),
keys = require('../object/keys');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.matches` which does not clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new function.
*/
function baseMatches(source) {
var props = keys(source),
length = props.length;
if (length == 1) {
var key = props[0],
value = source[key];
if (isStrictComparable(value)) {
return function(object) {
return object != null && object[key] === value && hasOwnProperty.call(object, key);
};
}
}
var values = Array(length),
strictCompareFlags = Array(length);
while (length--) {
value = source[props[length]];
values[length] = value;
strictCompareFlags[length] = isStrictComparable(value);
}
return function(object) {
return baseIsMatch(object, props, values, strictCompareFlags);
};
}
module.exports = baseMatches;
},{"../object/keys":39,"./baseIsMatch":13,"./isStrictComparable":27}],15:[function(require,module,exports){
var baseIsEqual = require('./baseIsEqual'),
isStrictComparable = require('./isStrictComparable');
/**
* The base implementation of `_.matchesProperty` which does not coerce `key`
* to a string.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} value The value to compare.
* @returns {Function} Returns the new function.
*/
function baseMatchesProperty(key, value) {
if (isStrictComparable(value)) {
return function(object) {
return object != null && object[key] === value;
};
}
return function(object) {
return object != null && baseIsEqual(value, object[key], null, true);
};
}
module.exports = baseMatchesProperty;
},{"./baseIsEqual":11,"./isStrictComparable":27}],16:[function(require,module,exports){
/**
* The base implementation of `_.property` which does not coerce `key` to a string.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
module.exports = baseProperty;
},{}],17:[function(require,module,exports){
var identity = require('../utility/identity'),
metaMap = require('./metaMap');
/**
* The base implementation of `setData` without support for hot loop detection.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var baseSetData = !metaMap ? identity : function(func, data) {
metaMap.set(func, data);
return func;
};
module.exports = baseSetData;
},{"../utility/identity":43,"./metaMap":28}],18:[function(require,module,exports){
/**
* Converts `value` to a string if it is not one. An empty string is returned
* for `null` or `undefined` values.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
if (typeof value == 'string') {
return value;
}
return value == null ? '' : (value + '');
}
module.exports = baseToString;
},{}],19:[function(require,module,exports){
var identity = require('../utility/identity');
/**
* A specialized version of `baseCallback` which only supports `this` binding
* and specifying the number of arguments to provide to `func`.
*
* @private
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {number} [argCount] The number of arguments to provide to `func`.
* @returns {Function} Returns the callback.
*/
function bindCallback(func, thisArg, argCount) {
if (typeof func != 'function') {
return identity;
}
if (typeof thisArg == 'undefined') {
return func;
}
switch (argCount) {
case 1: return function(value) {
return func.call(thisArg, value);
};
case 3: return function(value, index, collection) {
return func.call(thisArg, value, index, collection);
};
case 4: return function(accumulator, value, index, collection) {
return func.call(thisArg, accumulator, value, index, collection);
};
case 5: return function(value, other, key, object, source) {
return func.call(thisArg, value, other, key, object, source);
};
}
return function() {
return func.apply(thisArg, arguments);
};
}
module.exports = bindCallback;
},{"../utility/identity":43}],20:[function(require,module,exports){
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparing arrays.
* @param {boolean} [isWhere] Specify performing partial comparisons.
* @param {Array} [stackA] Tracks traversed `value` objects.
* @param {Array} [stackB] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stackB) {
var index = -1,
arrLength = array.length,
othLength = other.length,
result = true;
if (arrLength != othLength && !(isWhere && othLength > arrLength)) {
return false;
}
// Deep compare the contents, ignoring non-numeric properties.
while (result && ++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
result = undefined;
if (customizer) {
result = isWhere
? customizer(othValue, arrValue, index)
: customizer(arrValue, othValue, index);
}
if (typeof result == 'undefined') {
// Recursively compare arrays (susceptible to call stack limits).
if (isWhere) {
var othIndex = othLength;
while (othIndex--) {
othValue = other[othIndex];
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);
if (result) {
break;
}
}
} else {
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB);
}
}
}
return !!result;
}
module.exports = equalArrays;
},{}],21:[function(require,module,exports){
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
stringTag = '[object String]';
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} value The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag) {
switch (tag) {
case boolTag:
case dateTag:
// Coerce dates and booleans to numbers, dates to milliseconds and booleans
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
return +object == +other;
case errorTag:
return object.name == other.name && object.message == other.message;
case numberTag:
// Treat `NaN` vs. `NaN` as equal.
return (object != +object)
? other != +other
// But, treat `-0` vs. `+0` as not equal.
: (object == 0 ? ((1 / object) == (1 / other)) : object == +other);
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings primitives and string
// objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
return object == (other + '');
}
return false;
}
module.exports = equalByTag;
},{}],22:[function(require,module,exports){
var keys = require('../object/keys');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Function} [customizer] The function to customize comparing values.
* @param {boolean} [isWhere] Specify performing partial comparisons.
* @param {Array} [stackA] Tracks traversed `value` objects.
* @param {Array} [stackB] Tracks traversed `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, stackB) {
var objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
if (objLength != othLength && !isWhere) {
return false;
}
var hasCtor,
index = -1;
while (++index < objLength) {
var key = objProps[index],
result = hasOwnProperty.call(other, key);
if (result) {
var objValue = object[key],
othValue = other[key];
result = undefined;
if (customizer) {
result = isWhere
? customizer(othValue, objValue, key)
: customizer(objValue, othValue, key);
}
if (typeof result == 'undefined') {
// Recursively compare objects (susceptible to call stack limits).
result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isWhere, stackA, stackB);
}
}
if (!result) {
return false;
}
hasCtor || (hasCtor = key == 'constructor');
}
if (!hasCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
return false;
}
}
return true;
}
module.exports = equalObjects;
},{"../object/keys":39}],23:[function(require,module,exports){
var baseSetData = require('./baseSetData'),
isNative = require('../lang/isNative'),
support = require('../support');
/** Used to detect named functions. */
var reFuncName = /^\s*function[ \n\r\t]+\w/;
/** Used to detect functions containing a `this` reference. */
var reThis = /\bthis\b/;
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
/**
* Checks if `func` is eligible for `this` binding.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is eligible, else `false`.
*/
function isBindable(func) {
var result = !(support.funcNames ? func.name : support.funcDecomp);
if (!result) {
var source = fnToString.call(func);
if (!support.funcNames) {
result = !reFuncName.test(source);
}
if (!result) {
// Check if `func` references the `this` keyword and store the result.
result = reThis.test(source) || isNative(func);
baseSetData(func, result);
}
}
return result;
}
module.exports = isBindable;
},{"../lang/isNative":33,"../support":42,"./baseSetData":17}],24:[function(require,module,exports){
/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
value = +value;
length = length == null ? MAX_SAFE_INTEGER : length;
return value > -1 && value % 1 == 0 && value < length;
}
module.exports = isIndex;
},{}],25:[function(require,module,exports){
/**
* Used as the maximum length of an array-like value.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
* for more details.
*/
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This function is based on ES `ToLength`. See the
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength)
* for more details.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
},{}],26:[function(require,module,exports){
/**
* Checks if `value` is object-like.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
*/
function isObjectLike(value) {
return (value && typeof value == 'object') || false;
}
module.exports = isObjectLike;
},{}],27:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
}
module.exports = isStrictComparable;
},{"../lang/isObject":35}],28:[function(require,module,exports){
(function (global){
var isNative = require('../lang/isNative');
/** Native method references. */
var WeakMap = isNative(WeakMap = global.WeakMap) && WeakMap;
/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;
module.exports = metaMap;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../lang/isNative":33}],29:[function(require,module,exports){
var isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isIndex = require('./isIndex'),
isLength = require('./isLength'),
keysIn = require('../object/keysIn'),
support = require('../support');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A fallback implementation of `Object.keys` which creates an array of the
* own enumerable property names of `object`.
*
* @private
* @param {Object} object The object to inspect.
* @returns {Array} Returns the array of property names.
*/
function shimKeys(object) {
var props = keysIn(object),
propsLength = props.length,
length = propsLength && object.length;
var allowIndexes = length && isLength(length) &&
(isArray(object) || (support.nonEnumArgs && isArguments(object)));
var index = -1,
result = [];
while (++index < propsLength) {
var key = props[index];
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
result.push(key);
}
}
return result;
}
module.exports = shimKeys;
},{"../lang/isArguments":31,"../lang/isArray":32,"../object/keysIn":40,"../support":42,"./isIndex":24,"./isLength":25}],30:[function(require,module,exports){
var isObject = require('../lang/isObject');
/**
* Converts `value` to an object if it is not one.
*
* @private
* @param {*} value The value to process.
* @returns {Object} Returns the object.
*/
function toObject(value) {
return isObject(value) ? value : Object(value);
}
module.exports = toObject;
},{"../lang/isObject":35}],31:[function(require,module,exports){
var isLength = require('../internal/isLength'),
isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as an `arguments` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
var length = isObjectLike(value) ? value.length : undefined;
return (isLength(length) && objToString.call(value) == argsTag) || false;
}
module.exports = isArguments;
},{"../internal/isLength":25,"../internal/isObjectLike":26}],32:[function(require,module,exports){
var isLength = require('../internal/isLength'),
isNative = require('./isNative'),
isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var arrayTag = '[object Array]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray;
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(function() { return arguments; }());
* // => false
*/
var isArray = nativeIsArray || function(value) {
return (isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag) || false;
};
module.exports = isArray;
},{"../internal/isLength":25,"../internal/isObjectLike":26,"./isNative":33}],33:[function(require,module,exports){
var escapeRegExp = require('../string/escapeRegExp'),
isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var funcTag = '[object Function]';
/** Used to detect host constructors (Safari > 5). */
var reHostCtor = /^\[object .+?Constructor\]$/;
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var fnToString = Function.prototype.toString;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/** Used to detect if a method is native. */
var reNative = RegExp('^' +
escapeRegExp(objToString)
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function, else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (value == null) {
return false;
}
if (objToString.call(value) == funcTag) {
return reNative.test(fnToString.call(value));
}
return (isObjectLike(value) && reHostCtor.test(value)) || false;
}
module.exports = isNative;
},{"../internal/isObjectLike":26,"../string/escapeRegExp":41}],34:[function(require,module,exports){
var isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var numberTag = '[object Number]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
* as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isNumber(8.4);
* // => true
*
* _.isNumber(NaN);
* // => true
*
* _.isNumber('8.4');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag) || false;
}
module.exports = isNumber;
},{"../internal/isObjectLike":26}],35:[function(require,module,exports){
/**
* Checks if `value` is the language type of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(1);
* // => false
*/
function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;
return type == 'function' || (value && type == 'object') || false;
}
module.exports = isObject;
},{}],36:[function(require,module,exports){
var isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var stringTag = '[object String]';
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag) || false;
}
module.exports = isString;
},{"../internal/isObjectLike":26}],37:[function(require,module,exports){
var isLength = require('../internal/isLength'),
isObjectLike = require('../internal/isObjectLike');
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dateTag] = typedArrayTags[errorTag] =
typedArrayTags[funcTag] = typedArrayTags[mapTag] =
typedArrayTags[numberTag] = typedArrayTags[objectTag] =
typedArrayTags[regexpTag] = typedArrayTags[setTag] =
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
/** Used for native method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the `toStringTag` of values.
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
* for more details.
*/
var objToString = objectProto.toString;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
function isTypedArray(value) {
return (isObjectLike(value) && isLength(value.length) && typedArrayTags[objToString.call(value)]) || false;
}
module.exports = isTypedArray;
},{"../internal/isLength":25,"../internal/isObjectLike":26}],38:[function(require,module,exports){
/**
* Checks if `value` is `undefined`.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return typeof value == 'undefined';
}
module.exports = isUndefined;
},{}],39:[function(require,module,exports){
var isLength = require('../internal/isLength'),
isNative = require('../lang/isNative'),
isObject = require('../lang/isObject'),
shimKeys = require('../internal/shimKeys');
/* Native method references for those with the same name as other `lodash` methods. */
var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
* for more details.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
var keys = !nativeKeys ? shimKeys : function(object) {
if (object) {
var Ctor = object.constructor,
length = object.length;
}
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
(typeof object != 'function' && (length && isLength(length)))) {
return shimKeys(object);
}
return isObject(object) ? nativeKeys(object) : [];
};
module.exports = keys;
},{"../internal/isLength":25,"../internal/shimKeys":29,"../lang/isNative":33,"../lang/isObject":35}],40:[function(require,module,exports){
var isArguments = require('../lang/isArguments'),
isArray = require('../lang/isArray'),
isIndex = require('../internal/isIndex'),
isLength = require('../internal/isLength'),
isObject = require('../lang/isObject'),
support = require('../support');
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
if (object == null) {
return [];
}
if (!isObject(object)) {
object = Object(object);
}
var length = object.length;
length = (length && isLength(length) &&
(isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0;
var Ctor = object.constructor,
index = -1,
isProto = typeof Ctor == 'function' && Ctor.prototype === object,
result = Array(length),
skipIndexes = length > 0;
while (++index < length) {
result[index] = (index + '');
}
for (var key in object) {
if (!(skipIndexes && isIndex(key, length)) &&
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = keysIn;
},{"../internal/isIndex":24,"../internal/isLength":25,"../lang/isArguments":31,"../lang/isArray":32,"../lang/isObject":35,"../support":42}],41:[function(require,module,exports){
var baseToString = require('../internal/baseToString');
/**
* Used to match `RegExp` special characters.
* See this [article on `RegExp` characters](http://www.regular-expressions.info/characters.html#special)
* for more details.
*/
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
reHasRegExpChars = RegExp(reRegExpChars.source);
/**
* Escapes the `RegExp` special characters "\", "^", "$", ".", "|", "?", "*",
* "+", "(", ")", "[", "]", "{" and "}" in `string`.
*
* @static
* @memberOf _
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = baseToString(string);
return (string && reHasRegExpChars.test(string))
? string.replace(reRegExpChars, '\\$&')
: string;
}
module.exports = escapeRegExp;
},{"../internal/baseToString":18}],42:[function(require,module,exports){
(function (global){
var isNative = require('./lang/isNative');
/** Used to detect functions containing a `this` reference. */
var reThis = /\bthis\b/;
/** Used for native method references. */
var objectProto = Object.prototype;
/** Used to detect DOM support. */
var document = (document = global.window) && document.document;
/** Native method references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* An object environment feature flags.
*
* @static
* @memberOf _
* @type Object
*/
var support = {};
(function(x) {
/**
* Detect if functions can be decompiled by `Function#toString`
* (all but Firefox OS certified apps, older Opera mobile browsers, and
* the PlayStation 3; forced `false` for Windows 8 apps).
*
* @memberOf _.support
* @type boolean
*/
support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });
/**
* Detect if `Function#name` is supported (all but IE).
*
* @memberOf _.support
* @type boolean
*/
support.funcNames = typeof Function.name == 'string';
/**
* Detect if the DOM is supported.
*
* @memberOf _.support
* @type boolean
*/
try {
support.dom = document.createDocumentFragment().nodeType === 11;
} catch(e) {
support.dom = false;
}
/**
* Detect if `arguments` object indexes are non-enumerable.
*
* In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
* indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
* `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
* checks for indexes that exceed their function's formal parameters with
* associated values of `0`.
*
* @memberOf _.support
* @type boolean
*/
try {
support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1);
} catch(e) {
support.nonEnumArgs = true;
}
}(0, 0));
module.exports = support;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./lang/isNative":33}],43:[function(require,module,exports){
/**
* This method returns the first argument provided to it.
*
* @static
* @memberOf _
* @category Utility
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'user': 'fred' };
*
* _.identity(object) === object;
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
},{}]},{},[2])(2)
});