File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"use strict" ;
22
3- var validationRegex = / ^ [ a - z ] [ a - z \d ] { 1 , 3 } \s * ?\d [ a - z ] { 2 } $ / i,
3+ var validationRegex = / ^ [ a - z ] ( [ a - z ] \d [ a - z ] | \d [ a - z ] | \d | \d \d | [ a - z ] \d | [ a - z ] \d \d ) \s * ?\d [ a - z ] { 2 } $ / i,
44 incodeRegex = / \d [ a - z ] { 2 } $ / i,
5- validOutcodeRegex = / ^ [ a - z ] [ a - z \d ] { 1 , 3 } $ / i,
5+ validOutcodeRegex = / ^ [ a - z ] ( [ a - z ] \d [ a - z ] | \d [ a - z ] | \d | \d \d | [ a - z ] \d | [ a - z ] \d \d ) $ / i,
66 areaRegex = / ^ [ a - z ] { 1 , 2 } / i,
77 districtSplitRegex = / ^ ( [ a - z ] { 1 , 2 } \d ) ( [ a - z ] ) $ / i,
88 sectorRegex = / ^ [ a - z ] [ a - z \d ] { 1 , 3 } \s * ?\d / i,
Original file line number Diff line number Diff line change 11{
22 "name" : " postcode" ,
3- "version" : " 0.2.4 " ,
3+ "version" : " 0.2.5 " ,
44 "description" : " UK Postcode helper methods" ,
55 "main" : " index.js" ,
66 "directories" : {
Original file line number Diff line number Diff line change 3636 "base" : " MA1 1AA" ,
3737 "expected" : true
3838 },
39+ {
40+ "base" : " EH1 JS" ,
41+ "expected" : false
42+ },
3943 {
4044 "base" : " BT35 8GE" ,
4145 "expected" : true
You can’t perform that action at this time.
0 commit comments