Skip to content

Commit

Permalink
Reorganize and clean up folder. Version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hallberg committed Feb 13, 2017
1 parent bdf8f0d commit 9c97ecc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 38 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getByZipCode(_zip) {
if (zip.match(/\D/)) return null;
// Load data if not loaded
if (zipTree === null) {
zipTree = require('./zip-tree.json');
zipTree = require('./data/zip-tree.json');
}
const p = getPath(zip + '');
const place = zipTree[p[0]] && zipTree[p[0]][p[1]] && zipTree[p[0]][p[1]][p[2]] && zipTree[p[0]][p[1]][p[2]][p[3]] && zipTree[p[0]][p[1]][p[2]][p[3]][p[4]]
Expand All @@ -35,7 +35,7 @@ function getByLocation(lat, long, count) {
// Validate
if (typeof long === 'undefined') return null;
if (locTree === null) {
locTree = require('./loc-tree.json');
locTree = require('./data/loc-tree.json');
}
const latIndex = Math.round(Math.abs(lat));
const longIndex = Math.round(Math.abs(long));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zips",
"version": "1.1.0",
"version": "1.1.1",
"description": "Light, fast, tree-based way to get cities by zipcode and location.",
"main": "index.js",
"scripts": {
Expand Down
35 changes: 0 additions & 35 deletions test.js

This file was deleted.

0 comments on commit 9c97ecc

Please sign in to comment.