{"_id":"usa-states","_rev":"8-34426b3a1b118f6ff21ae3af8f32b0f1","name":"usa-states","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"usa-states","version":"0.0.1","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"24737f5ddfa6a1d31c0e399225ca9170961655a2","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.1","_shasum":"2e4c409a275ec0c790bd8df0ae484d0049c78422","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.9.4","_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"dist":{"shasum":"2e4c409a275ec0c790bd8df0ae484d0049c78422","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.1.tgz","integrity":"sha512-BN6Gd8EovouAVqSV+KjcH+KUv2zYI4/PacM1HzDZF2Z4BgFyG7ky10IbzCbNhWd468Ox0VaelQVs3YWBcr6nTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEEMWCzaI9jraGssuWv1e7ZdidLbTVVydULEX8LXFrOvAiEAhCVK7W1BORkDneOG3haY60iPRV3Mlo07a585RDkYr3s="}]},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/usa-states-0.0.1.tgz_1493736348489_0.5633775535970926"},"directories":{}},"0.0.2":{"name":"usa-states","version":"0.0.2","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"85a5740997fc014e3d2391898323eb593836ef00","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.2","_shasum":"6e9793ac1970e20d5c03bd763c6ea341f380a222","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.9.4","_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"dist":{"shasum":"6e9793ac1970e20d5c03bd763c6ea341f380a222","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.2.tgz","integrity":"sha512-+I9vYVOaXvGZSOHVcP/jDF7JbDSqYCHocCxDql95Y1Lgn0yntz0dERtSwzcwLZwhjpcAODK0kODIE1Oo1k2kqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkYp8ulXMijdrBWKjtV5d+E+ZttjNcX+JXBUF68gWfNgIgEl/wMbrDwhDlsGli4D0bvq0uH+7AuoSBBU9sG5Dalsw="}]},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/usa-states-0.0.2.tgz_1493736418498_0.19076152448542416"},"directories":{}},"0.0.3":{"name":"usa-states","version":"0.0.3","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"26af70842bb3252a4d48d83883af1c546fca0793","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.3","_shasum":"75beee48dc61710cc89ae6dbd63ecd19a7615a1d","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.9.4","_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"dist":{"shasum":"75beee48dc61710cc89ae6dbd63ecd19a7615a1d","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.3.tgz","integrity":"sha512-iW4x18AaFBmT9fAF50V/fU8gXtwWgz9eTM11KB7dLBS4/2XLkdGw08LRCVrBdCMAMNLtMjKz1Wz8W6SATtlXwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyeJP5NSj8HN+H7emAnEPtq1MSVz8vuM6OLNbYI8s6ZAIhALnU188jztvYRD9NyfpcSzHuAGPsyh1PbyRx9M8HpEb5"}]},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/usa-states-0.0.3.tgz_1493736720565_0.4134133292827755"},"directories":{}},"0.0.4":{"name":"usa-states","version":"0.0.4","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"3615c48eafdaa95078fa8bb41ff4b3aefbc36d9f","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.4","_shasum":"0a931a81005402f8466f5ebc2ad1aae65fbfb8ff","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.9.4","_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"dist":{"shasum":"0a931a81005402f8466f5ebc2ad1aae65fbfb8ff","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.4.tgz","integrity":"sha512-1xrBaQDjSdJsLdK8jAfYSRMr2XEB9bKdyQx5QXK6j5/6BIHE3CTWtv2DgPFUqHWG6zZDfSqDgVkFAtNweoaybg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgQrG6mO5yt4PnX5SOpgBQxbIFEx17r8H00do1VhG9PAiEAp8Ami207S6vnmiDrPCGhqY6wNCLV8z0TG0Uf7x8j96g="}]},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/usa-states-0.0.4.tgz_1493737060591_0.10601703636348248"},"directories":{}},"0.0.5":{"name":"usa-states","version":"0.0.5","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"62d25d2dd6affa152166f9f1a7c1a55708e5f0f8","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.5","_shasum":"3a88c972def5345ae9b87186fc4402385b861bb7","_from":".","_npmVersion":"4.1.2","_nodeVersion":"6.9.4","_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"dist":{"shasum":"3a88c972def5345ae9b87186fc4402385b861bb7","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.5.tgz","integrity":"sha512-NOkkXCA5DB1jDgXugHy6voIAQNMdDWSd+33Ru+C9bCg8iZKKujzZT6H5HEllaTBHAJze2c61om/6YWtIVN8DuQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxP5JY0S6NwUGYgI4nX+q9Zg1J7nWzwiYtnR9oNRkknQIhAKwMdy2SfL7xQOawpfE8fFjBy4ZSFQ+rTeTo/HVzkfpQ"}]},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/usa-states-0.0.5.tgz_1493835669411_0.1920469671022147"},"directories":{}},"0.0.6":{"name":"usa-states","version":"0.0.6","description":"Helper library for getting all of the states and territories of the United States in the specific format that you need.","main":"index.js","scripts":{"test":"test"},"keywords":["united","states","array","abbreviation","abbreviations","state"],"url":"https://github.com/unfortunatetoast/usa-states","repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"typings":"./src/index.d.ts","license":"ISC","gitHead":"4b61ebddbefe69e14d76e359b3f6eab87e9f0969","bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","_id":"usa-states@0.0.6","_nodeVersion":"14.15.4","_npmVersion":"7.8.0","dist":{"integrity":"sha512-f2RAYNLcw8ZXocYWx0EwFUcjJt0uuY3brlrCQXLC8Xuj7K0eIn7r9343wEe6Kg9Hg5KLYLFF9WVRjkxIhP+wSA==","shasum":"64a818201fb16da505d93e2aca4e43b0255273b3","tarball":"https://registry.npmjs.org/usa-states/-/usa-states-0.0.6.tgz","fileCount":13,"unpackedSize":242449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLeaIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWIw//Q/QTQdX2A7M1JV/0ZQqDh3l3VyeR8x2uOIAOfkEJn2EYzdqG\r\nlxViH0iBa9zdfIA7TOii2mf7T+XUjOls20rpc8Ho8bH5EjoSsifRjZE+8Ize\r\nGOnNZ53sR4IAk/3hBLOw7VImbzSGG/i4ms0fwUweYPTwoBhTgBjU/B250XON\r\neP6N/H6xAJ9Gm6nGe7YGqPq3aJX03CCufZMfrHuHzryMArNEoOdgF1yV4TA3\r\nLxgs47RngaxEPIUl7cIE2bulNAHj9iXknHl5mR/YpO8hKF0KrYm7NqWxAPLY\r\nP1sj6LifJzC2SXxO6KhzaYn4U5j6FCBFC8bDys/utVXxUIL5XcOuY2NWD3lq\r\nfO3IR3PesJA0p9OWW3NzuFaTHZifC0AsTrEfxSfyHQi895f1rpGRYSM7GQb1\r\nfc2tsmYkmMUZ5OpQxcXuE+HNWzkdVFVNbLQiWtYkt1JdAUTeYSg3QhtmEUEd\r\nnWS4ntRbPy3JAL8N0k+JTZFzEwGl01U1k7Hpwv7hTpDkPL3KLP8UN6T5S//N\r\nWWig6wxXJeMtHezLzGZWI5DPiPh+C5agbJMVMTa8stE+zr+H1n5VFS7uzP3a\r\n8I1sZa3DSjUhqscWhkGVSurvKQ/opCa4icCzKWGyUifizRUl6/82fbnjcUg+\r\nfQIKjMLj9zDawYvn72xBPFks3sqNQOyj+3I=\r\n=qZ4C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrzfgcMwEca7lxLlihbQmIqFCOaaxCpu8XSBWgV51jSAIga3JyyL6jVQG1ybdpInxjcJ/WWxDGp/wPDeEmZ82KZnQ="}]},"_npmUser":{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"},"directories":{},"maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/usa-states_0.0.6_1647175304586_0.8583673464220987"},"_hasShrinkwrap":false}},"readme":"# Usa States\n\nA simple javascript library to aid with the creation of your custom array of US States.\n\n## Installation\n\n`npm install usa-states`\n\nThen include the library in your project with either\n\n```javascript\nvar UsaStates = require('usa-states').UsaStates;\n```\n\nor\n\n```html\n<script src=\"/js/usa-states.js\"></script>\n```\n\n## Usage\n\nTo quickly get a simple array of US States objects\n\n```javascript\nvar usStates = new UsaStates();\nconsole.log(usStates.states);\n```\nOutputs\n```\n{\n    name: \"Alabama\",\n    abbreviation: \"AL\",\n    territory: false,\n    capital: \"Montgomery\",\n    contiguous: true\n},\n{\n    name: \"Alaska\",\n    abbreviation: \"AK\",\n    territory: false,\n    capital: \"Juneau\",\n    contiguous: false\n},\n...(other states omitted for brevity)\n{\n    name: \"Wyoming\",\n    abbreviation: \"WY\",\n    territory: false,\n    capital: \"Cheyenne\",\n    contiguous: true\n}\n```\n\nYou can optionally filter or add to the list of US States\n\n```javascript\nvar lowerFourtyEight = new UsaStates({contiguousOnly: true});\nconsole.log('Lower 48 states only', lowerFourtyEight.states);\n\nvar statesAndTerritories = new UsaStates({includeTerritories: true}); \nconsole.log('All states including territories', statesAndTerritories.states);\n\n```\n\nYou can also manually exclude one or more using any of the alias selectors\n\n```javascript\nvar allStatesExceptDCandWY = new UsaStates({exclude: ['DC', 'Wyoming']});\n```\n\nYou can get them as an array of strings using an alias selector\n(full list of alias selectors below)\n\n```javascript\nvar usStates = new UsaStates(myOptionalFilterSettings);\nvar statesAbbreviation = usStates.arrayOf('abbreviations');\nvar statesNames = usStates.arrayOf('names');\nconsole.log(statesAbbreviation);\nconsole.log(statesNames);\n```\nOutputs\n```\n[\"AL\", \"AK\", ... , \"WY\"]\n[\"Alabama\", \"Alaska\", ..., \"Wyoming\"]\n```\n\nYou can also get them as an array of custom objects using the alias selectors\nIf you want an alias ignored just append a '$' character to the desired location\n(note: you can change this ignore character in your filter config, see below)\n\n```javascript\nvar usStates = new UsaStates(myOptionalFilterSettings);\nvar myCustomStates = usStates.format({\n    name: 'abbreviation',\n    $abbreviation: 'abbr', // alternate alias 'abbr', see all below\n    abbr: '$name',\n    $capital: 'c',\n});\nconsole.log(myCustomStates);\n```\nOutputs\n```\n{\n    Alabama: \"AL\",\n    abbreviation: \"AL\",\n    AL: \"name\",\n    capital: \"Mobile\"\n},\n{\n    Alaska: \"AK\",\n    abbreviation: \"AK\",\n    AK: \"name\",\n    capital: \"Juneau\"\n},\n...\n{\n    Wyoming: \"WY\",\n    abbreviation: \"WY\",\n    WY: \"name\",\n    capital: \"Cheyenne\"\n}\n```\n\n### Configuration Settings\n\n| Property Name | Default | Description |\n| ------------- |:-------:| ----------- |\n| contingousOnly | `false` | Filter out any state that is not in the lower 48. (note: this also filters out territories) |\n| includeTerritories | `false` | Includes territories and affiliates of the United States such as Puerto Rico, Virgin Islands, etc. |\n| exclude | `[]` | An array of one or more states to filter from your list of states using any of the alias selectors |\n| ignoreCharacter | `\"$\"` | The character to parse out if found appended inside of the custom format given |\n\n### Alias Selectors\n\n| Name | Other Acceptable Aliases | Examples\n| ---- |:-----------------------:| -------\n| abbreviation | a, abbr, abbreviations, | AL, AK, ... WY\n| name | names, state, states, n, s | Alabama, Alaska, ... Wyoming |\n| capital | c, cap, capitals | Mobile, Juneau, ... Cheyenne |\n\n\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Credits\n\nAuthor: Nathan Barrett\nnathan.barrett@gmail.com\n\n## License\n\n### ISC License\nCopyright 2017 Nathan Barrett\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.","maintainers":[{"name":"nathanbarrett","email":"nathan.barrett@gmail.com"}],"time":{"modified":"2022-06-28T06:36:07.663Z","created":"2017-05-02T14:45:50.269Z","0.0.1":"2017-05-02T14:45:50.269Z","0.0.2":"2017-05-02T14:46:59.147Z","0.0.3":"2017-05-02T14:52:02.362Z","0.0.4":"2017-05-02T14:57:41.398Z","0.0.5":"2017-05-03T18:21:10.462Z","0.0.6":"2022-03-13T12:41:44.796Z"},"homepage":"https://github.com/unfortunatetoast/usa-states#readme","keywords":["united","states","array","abbreviation","abbreviations","state"],"repository":{"type":"git","url":"git+https://github.com/unfortunatetoast/usa-states.git"},"author":{"name":"Nathan Barrett","email":"nathan.barrett@gmail.com"},"bugs":{"url":"https://github.com/unfortunatetoast/usa-states/issues"},"license":"ISC","readmeFilename":"readme.md"}