Permalink
Browse files

trying to make jslint happy

  • Loading branch information...
1 parent f41401c commit 7bc08e28ad3f4c64760eb2bb91b1a8cc9e6c3d8d @aaronpowell committed Dec 2, 2011
Showing with 14 additions and 12 deletions.
  1. +14 −12 lib/tbd.js
View
@@ -1,5 +1,6 @@
-(function (undefined) {
- var __hasOwnProp = Object.prototype.hasOwnProperty,
+(function () {
+ 'use strict';
+ var hasOwnProp = Object.prototype.hasOwnProperty,
tbd;
function ValueBuilder(def, builder) {
@@ -9,10 +10,10 @@
if (typeof value === 'function') {
return value();
} else if (typeof value === 'object' && value) {
- if(value.constructor === Array) {
+ if (value.constructor === Array) {
return value.slice();
}
-
+
return tbd.from(value).make(1)[0];
}
return value;
@@ -22,8 +23,8 @@
value = data;
return self;
};
-
- this.make = function(num) {
+
+ this.make = function (num) {
return builder.make(num);
};
@@ -37,18 +38,18 @@
props = {},
self = this,
source = schema;
-
+
function parseSchema() {
var i;
for (i in schema) {
- if (!__hasOwnProp.call(schema, i) || __hasOwnProp.call(props, i)) continue;
-
+ if (!hasOwnProp.call(schema, i) || hasOwnProp.call(props, i)) continue;
+
props[i] = {
value: new ValueBuilder(schema[i], self)
};
}
}
-
+
if(typeof source !== 'function') {
parseSchema();
} else {
@@ -103,12 +104,13 @@
}).call(this);
(function() {
+ 'use strict';
var utils = {};
- utils.random = function() {
+ utils.random = function () {
var args = [].slice.call(arguments);
- return function() {
+ return function () {
var random = Math.random();
return args[Math.floor(random * args.length)];

0 comments on commit 7bc08e2

Please sign in to comment.