Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed dependency on jQuery

  • Loading branch information...
commit e7aa721ea24196b0866868274d7403137656eca1 1 parent f04d3b1
@cowboy authored
View
18 README.markdown
@@ -1,13 +1,24 @@
# jQuery getObject: get.and.set.deep.objects.easily = true; #
[http://benalman.com/projects/jquery-getobject-plugin/](http://benalman.com/projects/jquery-getobject-plugin/)
-Version: 1.0, Last updated: 12/19/2009
+Version: 1.1, Last updated: 12/24/2009
jQuery getObject allows you to get and set properties of an object via
dot-delimited name string. Inspired by the Dojo methods of the same names.
Visit the [project page](http://benalman.com/projects/jquery-getobject-plugin/) for more information and usage examples!
+### Note for non-jQuery users ###
+
+jQuery isn't actually required for this plugin, because nothing internal
+uses any jQuery methods or properties. jQuery is just used as a namespace
+under which these methods can exist.
+
+Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
+when this plugin is loaded, the methods described below will be created in
+the `Cowboy` namespace. Usage will be exactly the same, but instead of
+$.method() or jQuery.method(), you'll need to use Cowboy.method().
+
### Note for Dojo users ###
The setObject, getObject, and exists methods are similar to their Dojo
@@ -25,7 +36,7 @@ tested with, what browsers it has been tested in, and where the unit tests
reside (so you can test it yourself).
### jQuery Versions ###
-1.3.2, 1.4a2
+none, 1.3.2, 1.4a2
### Browsers Tested ###
Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.
@@ -36,7 +47,8 @@ Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.
## Release History ##
-1.0 - (12/19/2009) Initial release
+1.1 - (12/24/2009) Removed dependency on jQuery. Now creates methods in a `Cowboy` namespace if jQuery isn't present.
+1.0 - (12/19/2009) Initial release
## License ##
View
8 docs/files/jquery-ba-getobject-js.html
@@ -11,13 +11,15 @@
-<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="jQuery_getObject:get.and.set.deep.objects.easily=true;"></a>jQuery getObject: get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily = true;</h1><div class=CBody><p><b>Version: 1.0, Last updated: 12/19/2009</b></p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Project Home</td><td class=CDLDescription><a href="http://benalman.com/projects/jquery-getobject-plugin/" class=LURL target=_top>http://benalman.com<wbr>/projects<wbr>/jquery-getobject-plugin<wbr>/</a></td></tr><tr><td class=CDLEntry>GitHub</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/" class=LURL target=_top>http://github.com/cowboy/jquery-getobject/</a></td></tr><tr><td class=CDLEntry>Source</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-getobject<wbr>/raw<wbr>/master<wbr>/jquery.ba-getobject.js</a></td></tr><tr><td class=CDLEntry>(Minified)</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.min.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-getobject<wbr>/raw<wbr>/master<wbr>/jquery.ba-getobject.min.js</a> (0.6kb)</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#jQuery_getObject:get.and.set.deep.objects.easily=true;" >jQuery getObject: get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily = true;</a></td><td class=SDescription><b>Version: 1.0, Last updated: 12/19/2009</b></td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Dual licensed under the MIT and GPL licenses. </td></tr><tr class="SGeneric"><td class=SEntry><a href="#Support_and_Testing" >Support and Testing</a></td><td class=SDescription>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#Release_History" >Release History</a></td><td class=SDescription></td></tr><tr class="SGeneric"><td class=SEntry><a href="#Note_for_Dojo_users" >Note for Dojo users</a></td><td class=SDescription>The setObject, getObject, and exists methods are similar to their Dojo counterparts, with the exception that exists returns true or false based on whether or not a property is defined, not whether it is truthy.</td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#jQuery.getObject" >jQuery.<wbr>getObject</a></td><td class=SDescription>Get a property of an object via dot-delimited name string, and optionally create the property and any ancestor properties that do not already exist.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#jQuery.setObject" >jQuery.<wbr>setObject</a></td><td class=SDescription>Set a property of an object via dot-delimited name string, creating any ancestor properties that do not already exist.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#jQuery.exists" >jQuery.<wbr>exists</a></td><td class=SDescription>Using dot-delimited name string, return whether a property of an object exists.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
+<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="jQuery_getObject:get.and.set.deep.objects.easily=true;"></a>jQuery getObject: get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily = true;</h1><div class=CBody><p><b>Version: 1.1, Last updated: 12/24/2009</b></p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Project Home</td><td class=CDLDescription><a href="http://benalman.com/projects/jquery-getobject-plugin/" class=LURL target=_top>http://benalman.com<wbr>/projects<wbr>/jquery-getobject-plugin<wbr>/</a></td></tr><tr><td class=CDLEntry>GitHub</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/" class=LURL target=_top>http://github.com/cowboy/jquery-getobject/</a></td></tr><tr><td class=CDLEntry>Source</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-getobject<wbr>/raw<wbr>/master<wbr>/jquery.ba-getobject.js</a></td></tr><tr><td class=CDLEntry>(Minified)</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.min.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-getobject<wbr>/raw<wbr>/master<wbr>/jquery.ba-getobject.min.js</a> (0.7kb)</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#jQuery_getObject:get.and.set.deep.objects.easily=true;" >jQuery getObject: get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily = true;</a></td><td class=SDescription><b>Version: 1.1, Last updated: 12/24/2009</b></td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Dual licensed under the MIT and GPL licenses. </td></tr><tr class="SGeneric"><td class=SEntry><a href="#Support_and_Testing" >Support and Testing</a></td><td class=SDescription>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#Release_History" >Release History</a></td><td class=SDescription></td></tr><tr class="SGeneric"><td class=SEntry><a href="#Note_for_non-jQuery_users" >Note for non-jQuery users</a></td><td class=SDescription>jQuery isn&rsquo;t actually required for this plugin, because nothing internal uses any jQuery methods or properties. </td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#Note_for_Dojo_users" >Note for Dojo users</a></td><td class=SDescription>The setObject, getObject, and exists methods are similar to their Dojo counterparts, with the exception that exists returns true or false based on whether or not a property is defined, not whether it is truthy.</td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#jQuery.getObject" >jQuery.<wbr>getObject</a></td><td class=SDescription>Get a property of an object via dot-delimited name string, and optionally create the property and any ancestor properties that do not already exist.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#jQuery.setObject" >jQuery.<wbr>setObject</a></td><td class=SDescription>Set a property of an object via dot-delimited name string, creating any ancestor properties that do not already exist.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#jQuery.exists" >jQuery.<wbr>exists</a></td><td class=SDescription>Using dot-delimited name string, return whether a property of an object exists.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="License"></a>License</h3><div class=CBody><p>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Dual licensed under the MIT and GPL licenses.&nbsp; <a href="http://benalman.com/about/license/" class=LURL target=_top>http://benalman.com/about/license/</a></p><p>Inspired by Dojo, which is Copyright &copy; 2005-2009, The Dojo Foundation.</p></div></div></div>
-<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Support_and_Testing"></a>Support and Testing</h3><div class=CBody><p>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>jQuery Versions</td><td class=CDLDescription>1.3.2, 1.4a2</td></tr><tr><td class=CDLEntry>Browsers Tested</td><td class=CDLDescription>Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.</td></tr><tr><td class=CDLEntry>Unit Tests</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-getobject/unit/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-getobject<wbr>/unit<wbr>/</a></td></tr></table></div></div></div>
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Support_and_Testing"></a>Support and Testing</h3><div class=CBody><p>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>jQuery Versions</td><td class=CDLDescription>none, 1.3.2, 1.4a2</td></tr><tr><td class=CDLEntry>Browsers Tested</td><td class=CDLDescription>Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.</td></tr><tr><td class=CDLEntry>Unit Tests</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-getobject/unit/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-getobject<wbr>/unit<wbr>/</a></td></tr></table></div></div></div>
-<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Release_History"></a>Release History</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1.0</td><td class=CDLDescription>(12/19/2009) Initial release</td></tr></table></div></div></div>
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Release_History"></a>Release History</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1.1</td><td class=CDLDescription>(12/24/2009) Removed dependency on jQuery.&nbsp; Now creates methods in a `Cowboy` namespace if jQuery isn&rsquo;t present.</td></tr><tr><td class=CDLEntry>1.0</td><td class=CDLDescription>(12/19/2009) Initial release</td></tr></table></div></div></div>
+
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Note_for_non-jQuery_users"></a>Note for non-jQuery users</h3><div class=CBody><p>jQuery isn&rsquo;t actually required for this plugin, because nothing internal uses any jQuery methods or properties. jQuery is just used as a namespace under which these methods can exist.</p><p>Since jQuery isn&rsquo;t actually required for this plugin, if jQuery doesn&rsquo;t exist when this plugin is loaded, the methods described below will be created in the `Cowboy` namespace.&nbsp; Usage will be exactly the same, but instead of $.method() or jQuery.method(), you&rsquo;ll need to use Cowboy.method().</p></div></div></div>
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Note_for_Dojo_users"></a>Note for Dojo users</h3><div class=CBody><p>The setObject, getObject, and exists methods are similar to their Dojo counterparts, with the exception that exists returns true or false based on whether or not a property is defined, not whether it is truthy.</p></div></div></div>
View
2  docs/index/Files.html
@@ -13,7 +13,7 @@
<div id=Index><div class=IPageTitle>File Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; A &middot; B &middot; C &middot; D &middot; E &middot; F &middot; G &middot; H &middot; I &middot; <a href="#J">J</a> &middot; K &middot; L &middot; M &middot; N &middot; O &middot; P &middot; Q &middot; R &middot; S &middot; T &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="J"></a>J</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery_getObject:get.and.set.deep.objects.easily=true;" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>jQuery getObject:<wbr>get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily=true;</a></td></tr></table>
<!--START_ND_TOOLTIPS-->
-<div class=CToolTip id="tt1"><div class=CFile><b>Version: 1.0, Last updated: 12/19/2009</b></div></div><!--END_ND_TOOLTIPS-->
+<div class=CToolTip id="tt1"><div class=CFile><b>Version: 1.1, Last updated: 12/24/2009</b></div></div><!--END_ND_TOOLTIPS-->
</div><!--Index-->
View
8 docs/index/General.html
@@ -11,7 +11,7 @@
-<div id=Index><div class=IPageTitle>Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; A &middot; B &middot; C &middot; D &middot; <a href="#E">E</a> &middot; <a href="#F">F</a> &middot; <a href="#G">G</a> &middot; H &middot; I &middot; <a href="#J">J</a> &middot; K &middot; <a href="#L">L</a> &middot; M &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; <a href="#R">R</a> &middot; <a href="#S">S</a> &middot; T &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="E"></a>E</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.exists" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>exists</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=IHeading><a name="F"></a>F</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Functions" class=ISymbol>Functions</a></td></tr><tr><td class=IHeading><a name="G"></a>G</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.getObject" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>getObject</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=IHeading><a name="J"></a>J</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery_getObject:get.and.set.deep.objects.easily=true;" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>jQuery getObject:<wbr>get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily=true;</a></td></tr><tr><td class=IHeading><a name="L"></a>L</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#License" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>License</a></td></tr><tr><td class=IHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_Dojo_users" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')" class=ISymbol>Note for Dojo users</a></td></tr><tr><td class=IHeading><a name="R"></a>R</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Release_History" class=ISymbol>Release History</a></td></tr><tr><td class=IHeading><a name="S"></a>S</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.setObject" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')" class=ISymbol>setObject</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Support_and_Testing" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')" class=ISymbol>Support and Testing</a></td></tr></table>
+<div id=Index><div class=IPageTitle>Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; A &middot; B &middot; C &middot; D &middot; <a href="#E">E</a> &middot; <a href="#F">F</a> &middot; <a href="#G">G</a> &middot; H &middot; I &middot; <a href="#J">J</a> &middot; K &middot; <a href="#L">L</a> &middot; M &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; <a href="#R">R</a> &middot; <a href="#S">S</a> &middot; T &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="E"></a>E</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.exists" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>exists</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=IHeading><a name="F"></a>F</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Functions" class=ISymbol>Functions</a></td></tr><tr><td class=IHeading><a name="G"></a>G</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.getObject" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>getObject</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=IHeading><a name="J"></a>J</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery_getObject:get.and.set.deep.objects.easily=true;" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>jQuery getObject:<wbr>get.<wbr>and.<wbr>set.<wbr>deep.<wbr>objects.<wbr>easily=true;</a></td></tr><tr><td class=IHeading><a name="L"></a>L</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#License" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>License</a></td></tr><tr><td class=IHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_Dojo_users" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')" class=ISymbol>Note for Dojo users</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_non-jQuery_users" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')" class=ISymbol>Note for non-jQuery users</a></td></tr><tr><td class=IHeading><a name="R"></a>R</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Release_History" class=ISymbol>Release History</a></td></tr><tr><td class=IHeading><a name="S"></a>S</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#jQuery.setObject" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')" class=ISymbol>setObject</a>, <span class=IParent>jQuery</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/jquery-ba-getobject-js.html#Support_and_Testing" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')" class=ISymbol>Support and Testing</a></td></tr></table>
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction>Using dot-delimited name string, return whether a property of an object exists.</div></div><!--END_ND_TOOLTIPS-->
@@ -25,7 +25,7 @@
<!--START_ND_TOOLTIPS-->
-<div class=CToolTip id="tt3"><div class=CFile><b>Version: 1.0, Last updated: 12/19/2009</b></div></div><!--END_ND_TOOLTIPS-->
+<div class=CToolTip id="tt3"><div class=CFile><b>Version: 1.1, Last updated: 12/24/2009</b></div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
@@ -33,7 +33,7 @@
<!--START_ND_TOOLTIPS-->
-<div class=CToolTip id="tt5"><div class=CGeneric>The setObject, getObject, and exists methods are similar to their Dojo counterparts, with the exception that exists returns true or false based on whether or not a property is defined, not whether it is truthy.</div></div><!--END_ND_TOOLTIPS-->
+<div class=CToolTip id="tt5"><div class=CGeneric>The setObject, getObject, and exists methods are similar to their Dojo counterparts, with the exception that exists returns true or false based on whether or not a property is defined, not whether it is truthy.</div></div><div class=CToolTip id="tt6"><div class=CGeneric>jQuery isn&rsquo;t actually required for this plugin, because nothing internal uses any jQuery methods or properties. </div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
@@ -41,7 +41,7 @@
<!--START_ND_TOOLTIPS-->
-<div class=CToolTip id="tt6"><div class=CFunction>Set a property of an object via dot-delimited name string, creating any ancestor properties that do not already exist.</div></div><div class=CToolTip id="tt7"><div class=CGeneric>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</div></div><!--END_ND_TOOLTIPS-->
+<div class=CToolTip id="tt7"><div class=CFunction>Set a property of an object via dot-delimited name string, creating any ancestor properties that do not already exist.</div></div><div class=CToolTip id="tt8"><div class=CGeneric>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</div></div><!--END_ND_TOOLTIPS-->
</div><!--Index-->
View
BIN  docs/nd/Data/ConfigFileInfo.nd
Binary file not shown
View
4 docs/nd/Data/FileInfo.nd
@@ -1,4 +1,4 @@
1.4
JavaScript
-/srv/projects/jquery-getobject/jquery.ba-getobject.min.js 1261263027 0 /srv/projects/jquery-getobject/jquery.ba-getobject.min.js
-/srv/projects/jquery-getobject/jquery.ba-getobject.js 1261263023 1 jQuery getObject: get.and.set.deep.objects.easily = true;
+/srv/projects/jquery-getobject/jquery.ba-getobject.min.js 1261663568 0 /srv/projects/jquery-getobject/jquery.ba-getobject.min.js
+/srv/projects/jquery-getobject/jquery.ba-getobject.js 1261663560 1 jQuery getObject: get.and.set.deep.objects.easily = true;
View
BIN  docs/nd/Data/SymbolTable.nd
Binary file not shown
View
2  docs/search/GeneralN.html
@@ -11,7 +11,7 @@
-<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Note_spcfor_spcDojo_spcusers><div class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_Dojo_users" target=_parent class=ISymbol>Note for Dojo users</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
+<div id=Index><div class=SRStatus id=Loading>Loading...</div><table border=0 cellspacing=0 cellpadding=0><div class=SRResult id=SR_Note_spcfor_spcDojo_spcusers><div class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_Dojo_users" target=_parent class=ISymbol>Note for Dojo users</a></div></div><div class=SRResult id=SR_Note_spcfor_spcnon_minjQuery_spcusers><div class=IEntry><a href="../files/jquery-ba-getobject-js.html#Note_for_non-jQuery_users" target=_parent class=ISymbol>Note for non-jQuery users</a></div></div></table><div class=SRStatus id=Searching>Searching...</div><div class=SRStatus id=NoMatches>No Matches</div><script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults", "HTML");
View
33 jquery.ba-getobject.js
@@ -1,5 +1,5 @@
/*!
- * jQuery getObject - v1.0 - 12/19/2009
+ * jQuery getObject - v1.1 - 12/24/2009
* http://benalman.com/projects/jquery-getobject-plugin/
*
* Copyright (c) 2009 "Cowboy" Ben Alman
@@ -11,12 +11,12 @@
// Script: jQuery getObject: get.and.set.deep.objects.easily = true;
//
-// *Version: 1.0, Last updated: 12/19/2009*
+// *Version: 1.1, Last updated: 12/24/2009*
//
// Project Home - http://benalman.com/projects/jquery-getobject-plugin/
// GitHub - http://github.com/cowboy/jquery-getobject/
// Source - http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.js
-// (Minified) - http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.min.js (0.6kb)
+// (Minified) - http://github.com/cowboy/jquery-getobject/raw/master/jquery.ba-getobject.min.js (0.7kb)
//
// About: License
//
@@ -32,24 +32,43 @@
// tested with, what browsers it has been tested in, and where the unit tests
// reside (so you can test it yourself).
//
-// jQuery Versions - 1.3.2, 1.4a2
+// jQuery Versions - none, 1.3.2, 1.4a2
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.
// Unit Tests - http://benalman.com/code/projects/jquery-getobject/unit/
//
// About: Release History
//
+// 1.1 - (12/24/2009) Removed dependency on jQuery. Now creates methods in a
+// `Cowboy` namespace if jQuery isn't present.
// 1.0 - (12/19/2009) Initial release
//
+// Topic: Note for non-jQuery users
+//
+// jQuery isn't actually required for this plugin, because nothing internal
+// uses any jQuery methods or properties. jQuery is just used as a namespace
+// under which these methods can exist.
+//
+// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
+// when this plugin is loaded, the methods described below will be created in
+// the `Cowboy` namespace. Usage will be exactly the same, but instead of
+// $.method() or jQuery.method(), you'll need to use Cowboy.method().
+//
// Topic: Note for Dojo users
//
// The setObject, getObject, and exists methods are similar to their Dojo
// counterparts, with the exception that exists returns true or false based
// on whether or not a property is defined, not whether it is truthy.
-(function($,window,undefined){
+(function(window,undefined){
'$:nomunge'; // Used by YUI compressor.
- var jq_getObject;
+ // Since jQuery really isn't required for this plugin, use `jQuery` as the
+ // namespace only if it already exists, otherwise use the `Cowboy` namespace,
+ // creating it if necessary.
+ var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
+
+ // Method reference.
+ jq_getObject;
// Method: jQuery.getObject
//
@@ -155,4 +174,4 @@
return jq_getObject( name, context ) !== undefined;
};
-})(jQuery,this);
+})(this);
View
4 jquery.ba-getobject.min.js
@@ -1,5 +1,5 @@
/*
- * jQuery getObject - v1.0 - 12/19/2009
+ * jQuery getObject - v1.1 - 12/24/2009
* http://benalman.com/projects/jquery-getobject-plugin/
*
* Copyright (c) 2009 "Cowboy" Ben Alman
@@ -8,4 +8,4 @@
*
* Inspired by Dojo, which is Copyright (c) 2005-2009, The Dojo Foundation.
*/
-(function($,a,c){var b;$.getObject=b=function(g,d,f){if(typeof g==="string"){g=g.split(".")}if(typeof d!=="boolean"){f=d;d=c}f=f||a;var e;while(f&&g.length){e=g.shift();if(f[e]===c&&d){f[e]={}}f=f[e]}return f};$.setObject=function(d,f,e){var h=d.split("."),i=h.pop(),g=b(h,true,e);return g&&typeof g==="object"&&i?(g[i]=f):c};$.exists=function(d,e){return b(d,e)!==c}})(jQuery,this);
+(function(a,c){var $=a.jQuery||a.Cowboy||(a.Cowboy={}),b;$.getObject=b=function(g,d,f){if(typeof g==="string"){g=g.split(".")}if(typeof d!=="boolean"){f=d;d=c}f=f||a;var e;while(f&&g.length){e=g.shift();if(f[e]===c&&d){f[e]={}}f=f[e]}return f};$.setObject=function(d,f,e){var h=d.split("."),i=h.pop(),g=b(h,true,e);return g&&typeof g==="object"&&i?(g[i]=f):c};$.exists=function(d,e){return b(d,e)!==c}})(this);
View
11 unit/index.html
@@ -109,17 +109,6 @@
});
-/*
- var foo = { a: 1, b: 0, c: false, d: null, e: '' };
-
- $.exists(foo, 'a'); // returns true (property is defined and truthy)
- $.exists(foo, 'b'); // returns true (property is defined and falsy)
- $.exists(foo, 'c'); // returns true (property is defined and false)
- $.exists('foo.d'); // returns true (property is defined and falsy)
- $.exists('foo.e'); // returns true (property is defined and falsy)
- $.exists('foo.f'); // returns false (property is not defined)
-*/
-
}); // END CLOSURE
//-->
</script>
Please sign in to comment.
Something went wrong with that request. Please try again.