Skip to content

Commit 4676552

Browse files
committed
Initial commit
1 parent 73728b8 commit 4676552

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "postcode",
3+
"version": "0.1.0",
4+
"description": "UK Postcode helper methods",
5+
"main": "index.js",
6+
"directories": {
7+
"test": "tests"
8+
},
9+
"dependencies": {
10+
"chai": "~1.8.1"
11+
},
12+
"devDependencies": {
13+
"mocha": "~1.17.0"
14+
},
15+
"scripts": {
16+
"test": "mocha tests/"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/cblanc/postcode.js"
21+
},
22+
"keywords": [
23+
"uk",
24+
"postcode",
25+
"validation",
26+
"parsing"
27+
],
28+
"author": "Chris Blanchard",
29+
"license": "MIT",
30+
"bugs": {
31+
"url": "https://github.com/cblanc/postcode.js/issues"
32+
}
33+
}

tests/data/incode.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"tests" : [
3+
{
4+
"base" : "L27 8XY",
5+
"expected" : "L27"
6+
},
7+
{
8+
"base" : "NR10 3EZ",
9+
"expected" : "NR10"
10+
},
11+
{
12+
"base" : "RG4 5AY",
13+
"expected" : "RG4"
14+
},
15+
{
16+
"base" : "NE69 7AW",
17+
"expected" : "NE69"
18+
},
19+
{
20+
"base" : "SE23 2NF",
21+
"expected" : "SE23"
22+
},
23+
{
24+
"base" : "BT35 8GE",
25+
"expected" : "BT35"
26+
}
27+
]
28+
}

tests/data/outcode.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"tests" : [
3+
{
4+
"base" : "L27 8XY",
5+
"expected" : "8XY"
6+
},
7+
{
8+
"base" : "NR10 3EZ",
9+
"expected" : "3EZ"
10+
},
11+
{
12+
"base" : "RG4 5AY",
13+
"expected" : "5AY"
14+
},
15+
{
16+
"base" : "NE69 7AW",
17+
"expected" : "7AW"
18+
},
19+
{
20+
"base" : "SE23 2NF",
21+
"expected" : "2NF"
22+
},
23+
{
24+
"base" : "BT35 8GE",
25+
"expected" : "8GE"
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)