Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed node support

  • Loading branch information...
commit c6bc56a208d36968ed3d9346483c005ca8c9ee53 1 parent 2e5c29c
@andrewluetgers authored
Showing with 5 additions and 3 deletions.
  1. +1 −1  package.json
  2. +2 −2 src/grab.js
  3. +2 −0  tests/grab.html
View
2  package.json
@@ -2,7 +2,7 @@
"author": "Andrew Luetgers <andrew.luetgers@gmail.com> (http://www.andrewluetgers.com/)",
"name": "grab",
"description": "Makes grabbing values out of complex objects simpler.",
- "version": "0.0.2",
+ "version": "0.0.3",
"homepage": "https://github.com/andrewluetgers/grab.js",
"repository": {
"type": "git",
View
4 src/grab.js
@@ -5,8 +5,8 @@
var root = this,
_ = root._;
- if ("module" in root && module.exports) {
- _ = require("underscore");
+ if (!_ && "module" in root && module.exports) {
+ root._ = _ = require("underscore");
}
if (!_) {
View
2  tests/grab.html
@@ -7,6 +7,8 @@
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
<script type="text/javascript" src="qunit/qunit.js"></script>
<script type="text/javascript" src="underscore.js"></script>
+ <!--<script type="text/javascript" src="../lib/grab.js"></script>-->
+ <!--<script type="text/javascript" src="../lib/grab.min.js"></script>-->
<script type="text/javascript" src="../src/grab.js"></script>
<script type="text/javascript" src="grab.js"></script>
</head>

0 comments on commit c6bc56a

Please sign in to comment.
Something went wrong with that request. Please try again.