diff options
| author | Matthew Bergman <[email protected]> | 2010-05-14 22:38:13 -0400 |
|---|---|---|
| committer | Matthew Bergman <[email protected]> | 2010-05-14 22:38:13 -0400 |
| commit | 04288f8e1f24be8daafc5282bc8df35fcbc27b05 (patch) | |
| tree | 97142b8ad9e8127aa554c7953e23e5706aa129bb /index.js | |
| parent | 7176a0b8b39f1a635eee1dd7786980ec96707494 (diff) | |
| download | faker-04288f8e1f24be8daafc5282bc8df35fcbc27b05.tar.xz faker-04288f8e1f24be8daafc5282bc8df35fcbc27b05.zip | |
added helper file
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 27 |
1 files changed, 3 insertions, 24 deletions
@@ -5,30 +5,9 @@ var definitions = require('./lib/definitions'); var Faker = {}; Faker.Name = require('./lib/name'); +Faker.Address = require('./lib/address'); - -Faker.numerify = function(number_string){ - var str = ''; - for(var i = 0; i < number_string.length; i++){ - if(number_string[i] == "#"){ - str += Math.floor(Math.random()*10); - } - else{ - str += number_string[i] - } - } - return str; -}; - -Faker.letterify = function(letter_string){ - //return letter_string.gsub(/\?/) { ('a'..'z').to_a.rand } - return 'zzz'; -}; -Faker.bothify = function(string){ - // self.letterify(self.numerify(string)) - //letterify - return 'zz11zz'; -}; - +var Helper = require('helper');; sys.puts(JSON.stringify(Faker.Name.first_name())); +sys.puts(JSON.stringify(Faker.Address.zip_code())); |
