poly-js-utils
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "poly-js-utils", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Common client-side tools used in HSS Sites themes and locators.", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -40,2 +40,7 @@ var viewHelpers = require('../src/view-helpers'); | ||
}); | ||
it("should return undefined if the phone is null or undefined", function() { | ||
var phone; | ||
expect(viewHelpers.phoneFormat(phone)).toBe(undefined); | ||
}); | ||
}); | ||
@@ -42,0 +47,0 @@ |
@@ -52,2 +52,5 @@ /****************************/ | ||
var phoneFormat = function(phone, pretty) { | ||
if(!phone) { | ||
return; | ||
} | ||
var digits = utils.stripNonDigits(phone); | ||
@@ -54,0 +57,0 @@ if (!pretty) { |
89228
1921