underscore-source 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Underscore::Source
2
2
 
3
- TODO: Write a gem description
3
+ Wrap Underscore in a gem so that we can have bundler manage JavaScript library version dependencies. The version of this gem corresponds to the version of Underscore included.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ From your `application.js` use `//= require underscore` or `#= require underscore` if you're using CoffeeScript.
22
22
 
23
23
  ## Contributing
24
24
 
@@ -1,5 +1,5 @@
1
1
  module Underscore
2
2
  module Source
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -55,7 +55,7 @@
55
55
  root._ = _;
56
56
 
57
57
  // Current version.
58
- _.VERSION = '1.0.2';
58
+ _.VERSION = '1.0.3';
59
59
 
60
60
  // ------------------------ Collection Functions: ---------------------------
61
61
 
@@ -469,7 +469,7 @@
469
469
  // Check dates' integer values.
470
470
  if (_.isDate(a) && _.isDate(b)) return a.getTime() === b.getTime();
471
471
  // Both are NaN?
472
- if (_.isNaN(a) && _.isNaN(b)) return true;
472
+ if (_.isNaN(a) && _.isNaN(b)) return false;
473
473
  // Compare regular expressions.
474
474
  if (_.isRegExp(a) && _.isRegExp(b))
475
475
  return a.source === b.source &&
@@ -491,7 +491,7 @@
491
491
 
492
492
  // Is a given array or object empty?
493
493
  _.isEmpty = function(obj) {
494
- if (_.isArray(obj)) return obj.length === 0;
494
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
495
495
  for (var key in obj) if (hasOwnProperty.call(obj, key)) return false;
496
496
  return true;
497
497
  };
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: underscore-source
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.2
5
+ version: 1.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel X. Moore