Skip to content

Commit

Permalink
MOD: Updated underscore library and modules to expect version 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fernando-berrios committed May 2, 2012
1 parent 60eef21 commit 78f6d25
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 64 deletions.
36 changes: 33 additions & 3 deletions underscore.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ define(['underscore.module', 'underscore.string'], function (_, _string) {
var backstop = {};

if (_ === void 0) {
// https://github.com/documentcloud/underscore/blob/eeea70c457db3aebaef5b9251661f779844758fe/underscore.js
throw "Missing Dependency: Underscore.js v1.3.1";
// https://github.com/documentcloud/underscore/blob/599d31101b7a7b896ff73e338d26ae698833f878/underscore.js
throw "Missing Dependency: Underscore.js v1.3.3";
}

if (_string === void 0) {
Expand Down Expand Up @@ -113,6 +113,36 @@ define(['underscore.module', 'underscore.string'], function (_, _string) {
return output;
}

/*
Function: isShallow
Checks if an object or array is
Usage:
(start code)
var result = _.isShallow({}) // result == true
(end)
Parameters:
object - Value to check.
Returns:
Boolean, true if object
*/
function isShallow(object) {
var output = false;



return output;
}

/*
Function: hasEmptyOrWhitespaceValues
Expand Down Expand Up @@ -187,7 +217,7 @@ define(['underscore.module', 'underscore.string'], function (_, _string) {
*/
function ensureString(object, replaceString) {
var output = (!_.isNullOrUndefined(replaceString) && _.isString(replaceString)) ? replaceString : "";
var output = (!isNullOrUndefined(replaceString) && _.isString(replaceString)) ? replaceString : "";
if (!isNullOrUndefined(object) && !isEmptyOrWhitespace(object)) {
if (_.isString(object)) {
if (isWhitespace(object)) {
Expand Down
3 changes: 2 additions & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ define(['underscore'], function () {
var module = window._;

if (module === void 0) {
throw "Missing Dependency: Underscore.js v1.3.1";
// https://github.com/documentcloud/underscore/blob/599d31101b7a7b896ff73e338d26ae698833f878/underscore.js
throw "Missing Dependency: Underscore.js v1.3.3";
}

module = module.noConflict(); // Optional, but recommended :)
Expand Down
Loading

0 comments on commit 78f6d25

Please sign in to comment.