Skip to content

Commit

Permalink
reverting downcasing
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanDonovan committed Jan 7, 2013
1 parent 842063f commit 03701ad
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@


// EcmaScript 5.
"es5" : true, // Allow EcmaScript 5 syntax.
"es5" : false, // Allow EcmaScript 5 syntax.
"strict" : false, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').

Expand Down
33 changes: 17 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
you can include the Faker library into your existing node.js application by requiring the entire /Faker directory
var faker = require(./faker);
var randomName = faker.name.findName();
var randomName = Faker.Name.findName();
you can also simply include the "Faker.js" file which is the auto-generated bundled version of the Faker library
Expand All @@ -17,20 +17,21 @@
*/

exports.name = require('./lib/name');
exports.address = require('./lib/address');
exports.phoneNumber = require('./lib/phone_number');
exports.internet = require('./lib/internet');
exports.company = require('./lib/company');
exports.lorem = require('./lib/lorem');
exports.helpers = require('./lib/helpers');
exports.Name = require('./lib/name');
exports.Address = require('./lib/address');
exports.PhoneNumber = require('./lib/phone_number');
exports.Internet = require('./lib/internet');
exports.Company = require('./lib/company');
exports.Lorem = require('./lib/lorem');
exports.Helpers = require('./lib/helpers');
exports.random = require('./lib/random');
exports.definitions = require('./lib/definitions');

// Backward compatibility
exports.Name = exports.name;
exports.Address = exports.address;
exports.PhoneNumber = exports.phoneNumber;
exports.Internet = exports.internet;
exports.Company = exports.company;
exports.Lorem = exports.lorem;
exports.Helpers = exports.helpers;
// Aliases
exports.name = exports.Name;
exports.address = exports.Address;
exports.phoneNumber = exports.PhoneNumber;
exports.internet = exports.Internet;
exports.company = exports.Company;
exports.lorem = exports.Lorem;
exports.helpers = exports.Helpers;
26 changes: 13 additions & 13 deletions test/all.functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ var Faker = require('../index');
// Basic smoke tests to make sure each method is at least implemented and returns a string.

var modules = {
address: [
Address: [
'city', 'streetName', 'streetAddress', 'secondaryAddress',
'brState', 'ukCountry', 'ukCounty', 'usState', 'zipCode'//, 'zipCodeFormat'
'brState', 'ukCountry', 'ukCounty', 'usState', 'zipCode'
],

company: ['companyName', 'companySuffix', 'catchPhrase', 'bs'],
Company: ['companyName', 'companySuffix', 'catchPhrase', 'bs'],

internet: ['email', 'userName', 'domainName', 'domainWord', 'ip'],
Internet: ['email', 'userName', 'domainName', 'domainWord', 'ip'],

lorem: ['words', 'sentence', 'sentences', 'paragraph', 'paragraphs'],
Lorem: ['words', 'sentence', 'sentences', 'paragraph', 'paragraphs'],

name: ['firstName', 'lastName', 'findName'],
Name: ['firstName', 'lastName', 'findName'],

phoneNumber: ['phoneNumber']
PhoneNumber: ['phoneNumber']
};

// Backward compatibility.
modules.Address = modules.address;
modules.Company = modules.company;
modules.Internet = modules.internet;
modules.Lorem = modules.lorem;
modules.Name = modules.name;
modules.PhoneNumber = modules.phoneNumber;
modules.address = modules.Address;
modules.company = modules.Company;
modules.internet = modules.Internet;
modules.lorem = modules.Lorem;
modules.name = modules.Name;
modules.phoneNumber = modules.PhoneNumber;

describe("functional tests", function () {
Object.keys(modules).forEach(function (module) {
Expand Down

0 comments on commit 03701ad

Please sign in to comment.