<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/javascript/tags/object</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 06:31:18 GMT</pubDate>
<item>
<title>(JavaScript) Template for a Javascript function with optional and mandatory arguments passed as an object collection - davidwaterston</title>
<link>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</link>
<description><![CDATA[ <p>A simple template for a JavaScript function which allows for an arbitrary number of named arguments to be passed in. This is achieved by passing a single object as an argument with each of the 'real' arguments being a key/value pair. In this way arguments can be passed in any order and we can easily add in new arguments.

To call, simply pass in an object with the required arguments:
    myFunction ({opt1: 'cat', opt4: 'dog', opt2: 'monkey'})

Validates clean in jsLint.</p> ]]></description>
<pubDate>Mon, 03 Dec 2012 07:48:27 GMT</pubDate>
<guid>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</guid>
</item>
<item>
<title>(JavaScript) JSON Tree(1 function 15 lines)Nested Ul from single or multidimensional json object - halk</title>
<link>http://snipplr.com/view/67767/json-tree1-function-15-linesnested-ul-from-single-or-multidimensional-json-object/</link>
<description><![CDATA[ <p>Any valid json object will be recursively traversed building a nested unordered list of its properties and their values.  This example parses the json entered in the text area into an object that is passed to the json_tree() function.  I use the twitter bootstrap to make collapsible trees.  That is the purpose of thee css and the random string i generate.  I left it in as an example of how you might style the returned list.  This is very much a work in progress so if you have any suggestions please post a comment.  I have posted the entire html for a working example page just create the file and open it in your browser.(make sure your json validates - http://jsonlint.com - only valid json will produce a tree)</p> ]]></description>
<pubDate>Wed, 17 Oct 2012 04:48:13 GMT</pubDate>
<guid>http://snipplr.com/view/67767/json-tree1-function-15-linesnested-ul-from-single-or-multidimensional-json-object/</guid>
</item>
<item>
<title>(JavaScript) Make an empty object in JavaScript - EvanHahn</title>
<link>http://snipplr.com/view/63892/make-an-empty-object-in-javascript/</link>
<description><![CDATA[ <p>`Object.create(null)` is a more memory-efficient way to make objects, but it's not supported in all versions of JavaScript, so you can do the "old-fashioned" `{}` if that function isn't available.</p> ]]></description>
<pubDate>Mon, 12 Mar 2012 09:59:34 GMT</pubDate>
<guid>http://snipplr.com/view/63892/make-an-empty-object-in-javascript/</guid>
</item>
<item>
<title>(JavaScript) Get Object Size in JS - reverend</title>
<link>http://snipplr.com/view/63681/get-object-size-in-js/</link>
<description><![CDATA[ <p>Function to validate the existence of each key in the object to get the number of valid key/value pairs.</p> ]]></description>
<pubDate>Fri, 02 Mar 2012 10:45:09 GMT</pubDate>
<guid>http://snipplr.com/view/63681/get-object-size-in-js/</guid>
</item>
<item>
<title>(JavaScript) Optional function arguments/parameters by using associative array - coprolit</title>
<link>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</link>
<description><![CDATA[ <p>By not being limited to provide certain arguments/parameters in right order when calling a function, makes the function more versatile and easier to extend without breaking old code (e.g. calls to the function). 
One solution is to pass an associative array holding the parameters. 
Advantage: argument order is unnecessary, each argument have a label - easier to remember.</p> ]]></description>
<pubDate>Thu, 05 Jan 2012 00:13:08 GMT</pubDate>
<guid>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</guid>
</item>
<item>
<title>(JavaScript) JavaScript Object Prototypal inheritance - luizlopes</title>
<link>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</link>
<description><![CDATA[ <p>an operator that implements true prototypal Object inheritance in JavaScript</p> ]]></description>
<pubDate>Thu, 17 Nov 2011 05:10:33 GMT</pubDate>
<guid>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</guid>
</item>
<item>
<title>(JavaScript) get RGBA values as an object - claudiowebdesign</title>
<link>http://snipplr.com/view/60570/get-rgba-values-as-an-object/</link>
<description><![CDATA[ <p>this function gets a parameter like an hex color (es: "#ffffff"), an abbreviated hex color (es: "#fff"), an rgb color (es: "rgb(255,255,255)") or an rgba color (es: "rgba(255,255,255,1)"), and returns an object containing the rgba values, like { red:x, green:y, blue:z, alpha:k  }.</p> ]]></description>
<pubDate>Sun, 06 Nov 2011 05:13:03 GMT</pubDate>
<guid>http://snipplr.com/view/60570/get-rgba-values-as-an-object/</guid>
</item>
<item>
<title>(JavaScript) Delegate - dhjapan</title>
<link>http://snipplr.com/view/59394/delegate/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 04 Oct 2011 18:51:55 GMT</pubDate>
<guid>http://snipplr.com/view/59394/delegate/</guid>
</item>
<item>
<title>(JavaScript) Remove an object from an array - psradich111</title>
<link>http://snipplr.com/view/58689/remove-an-object-from-an-array/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 15 Sep 2011 03:59:27 GMT</pubDate>
<guid>http://snipplr.com/view/58689/remove-an-object-from-an-array/</guid>
</item>
<item>
<title>(JavaScript) Classes objects  prototype and static - devnull69</title>
<link>http://snipplr.com/view/56009/classes-objects--prototype-and-static/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 01 Jul 2011 22:32:55 GMT</pubDate>
<guid>http://snipplr.com/view/56009/classes-objects--prototype-and-static/</guid>
</item>
<item>
<title>(JavaScript) Iterate through keys in an object literal and return the key name. - supermauerbros</title>
<link>http://snipplr.com/view/55628/iterate-through-keys-in-an-object-literal-and-return-the-key-name/</link>
<description><![CDATA[ <p>Returns the key name in mainObject if it's a key, and hasOwnProperty of key (to rule out the prototype object. Then it also checks if the key is listed in an array using a jquery function and also tests if it's null.</p> ]]></description>
<pubDate>Thu, 23 Jun 2011 15:34:47 GMT</pubDate>
<guid>http://snipplr.com/view/55628/iterate-through-keys-in-an-object-literal-and-return-the-key-name/</guid>
</item>
<item>
<title>(JavaScript) Switch using an Object - 1man</title>
<link>http://snipplr.com/view/52613/switch-using-an-object/</link>
<description><![CDATA[ <p>Using an object as a simple switch.</p> ]]></description>
<pubDate>Wed, 27 Apr 2011 01:17:46 GMT</pubDate>
<guid>http://snipplr.com/view/52613/switch-using-an-object/</guid>
</item>
<item>
<title>(JavaScript) Cross-browser javascript event capture - onblur</title>
<link>http://snipplr.com/view/52304/crossbrowser-javascript-event-capture/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 19 Apr 2011 18:57:31 GMT</pubDate>
<guid>http://snipplr.com/view/52304/crossbrowser-javascript-event-capture/</guid>
</item>
<item>
<title>(JavaScript) Extjs - A smart registry to find objects easy - jvandemerwe</title>
<link>http://snipplr.com/view/51453/extjs--a-smart-registry-to-find-objects-easy/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 02 Apr 2011 07:11:30 GMT</pubDate>
<guid>http://snipplr.com/view/51453/extjs--a-smart-registry-to-find-objects-easy/</guid>
</item>
<item>
<title>(JavaScript) OOJS - Compare Execution Time of Both Approaches - reelfernandes</title>
<link>http://snipplr.com/view/50872/oojs--compare-execution-time-of-both-approaches/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Mar 2011 08:37:38 GMT</pubDate>
<guid>http://snipplr.com/view/50872/oojs--compare-execution-time-of-both-approaches/</guid>
</item>
<item>
<title>(JavaScript) OOJS - Object Oriented Javascript pt 2 - reelfernandes</title>
<link>http://snipplr.com/view/50870/oojs--object-oriented-javascript-pt-2/</link>
<description><![CDATA[ <p>using prototype to add instance methods to a Class</p> ]]></description>
<pubDate>Sun, 20 Mar 2011 08:23:58 GMT</pubDate>
<guid>http://snipplr.com/view/50870/oojs--object-oriented-javascript-pt-2/</guid>
</item>
<item>
<title>(JavaScript) OOJS - Object Oriented Javascript - reelfernandes</title>
<link>http://snipplr.com/view/50868/oojs--object-oriented-javascript/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Mar 2011 07:21:41 GMT</pubDate>
<guid>http://snipplr.com/view/50868/oojs--object-oriented-javascript/</guid>
</item>
<item>
<title>(JavaScript) Javascript revealing module pattern template - coprolit</title>
<link>http://snipplr.com/view/50765/javascript-revealing-module-pattern-template/</link>
<description><![CDATA[ <p>"Javascript module pattern emulates the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding/namespacing particular parts from the global scope."
When inheritance is not needed and a only few instances is needed (Keep in mind that each instance places a new copy of each function in memory!)</p> ]]></description>
<pubDate>Thu, 17 Mar 2011 08:40:45 GMT</pubDate>
<guid>http://snipplr.com/view/50765/javascript-revealing-module-pattern-template/</guid>
</item>
<item>
<title>(JavaScript) Checking Object Properties - ramonlechuga</title>
<link>http://snipplr.com/view/50276/checking-object-properties/</link>
<description><![CDATA[ <p>http://blog.ramonlechuga.com/2010/10/20/checking-object-structure/

The Array</p> ]]></description>
<pubDate>Tue, 08 Mar 2011 07:25:55 GMT</pubDate>
<guid>http://snipplr.com/view/50276/checking-object-properties/</guid>
</item>
<item>
<title>(JavaScript) JS Object Tmplate - loric</title>
<link>http://snipplr.com/view/49288/js-object-tmplate/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Feb 2011 18:59:03 GMT</pubDate>
<guid>http://snipplr.com/view/49288/js-object-tmplate/</guid>
</item>
</channel>
</rss>