aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Osipenko <[email protected]>2011-12-28 11:38:03 +0200
committerAlexey Osipenko <[email protected]>2011-12-28 11:38:03 +0200
commit84ab59342f333bc33a992ec5ca37d8716295a536 (patch)
tree9930ead4be40d782d766cac6b1409aa0d1a09668 /lib
parent308683c3c29c8e72148d6ce88f1c50880864b57f (diff)
downloadfaker-84ab59342f333bc33a992ec5ca37d8716295a536.tar.xz
faker-84ab59342f333bc33a992ec5ca37d8716295a536.zip
Trailing spaces
Diffstat (limited to 'lib')
-rw-r--r--lib/helpers.js16
-rw-r--r--lib/internet.js2
-rw-r--r--lib/name.js6
-rw-r--r--lib/phone_number.js6
4 files changed, 15 insertions, 15 deletions
diff --git a/lib/helpers.js b/lib/helpers.js
index 3fedf0ca..812d1567 100644
--- a/lib/helpers.js
+++ b/lib/helpers.js
@@ -1,6 +1,6 @@
var Faker = require('../Faker');
-// returns a single random number based on a range
+// returns a single random number based on a range
exports.randomNumber = function(range) {
r = Math.floor(Math.random()*range);
return r;
@@ -12,14 +12,14 @@ exports.randomize = function(array) {
return array[r];
};
-// parses string for a symbol and replace it with a random number from 1-10
+// parses string for a symbol and replace it with a random number from 1-10
exports.replaceSymbolWithNumber = function(string, symbol){
-
- // default symbol is '#'
+
+ // default symbol is '#'
if(typeof symbol == 'undefined'){
var symbol = '#';
}
-
+
var str = '';
for(var i = 0; i < string.length; i++){
if(string[i] == symbol){
@@ -32,15 +32,15 @@ exports.replaceSymbolWithNumber = function(string, symbol){
return str;
};
-// takes an array and returns it randomized
-exports.shuffle = function(o){
+// takes an array and returns it randomized
+exports.shuffle = function(o){
for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
exports.generateDataSet = function(size){
-
+
};
exports.createCard = function(){
diff --git a/lib/internet.js b/lib/internet.js
index df0b8c39..5ac8da7d 100644
--- a/lib/internet.js
+++ b/lib/internet.js
@@ -2,7 +2,7 @@ var Helpers = require('./helpers');
var definitions = require('./definitions');
exports.email = function() {
- return this.userName() + "@" + this.domainName();
+ return this.userName() + "@" + this.domainName();
};
exports.userName = function() {
diff --git a/lib/name.js b/lib/name.js
index 710765fc..0965b80e 100644
--- a/lib/name.js
+++ b/lib/name.js
@@ -1,12 +1,12 @@
var Helpers = require('./helpers');
var definitions = require('./definitions');
-/*
+/*
exports.first_name = function(){
-
+
return definitions.first_name()[0];
//Math.floor(Math.random()*10);
-
+
};
*/
diff --git a/lib/phone_number.js b/lib/phone_number.js
index aec5b9da..6fbf65bb 100644
--- a/lib/phone_number.js
+++ b/lib/phone_number.js
@@ -1,10 +1,10 @@
var Helpers = require('./helpers');
var definitions = require('./definitions');
-
+
exports.phoneNumber = function(){
-
+
return Helpers.replaceSymbolWithNumber(Helpers.randomize(definitions.phone_formats()));
-
+
};
exports.phoneNumberFormat = function ( format ){