UNPKG

punto

Version:

Bidirectional dot notation conversion.

32 lines (25 loc) 4.95 kB
<html> <head> </head> <body style="background: transparent;"> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/lunr.min.js"></script> <script src="scripts/fulltext-search.js"></script> <script type="text/x-docstrap-searchdb"> {"modules.list.html":{"id":"modules.list.html","title":"Modules","body":" Punto Modules Punto Classes Punto.Punto Modules Classes Punto × Search results Close Github Repository "},"classes.list.html":{"id":"classes.list.html","title":"Classes","body":" Punto Modules Punto Classes Punto.Punto Classes Classes Punto × Search results Close Github Repository "},"index.html":{"id":"index.html","title":"Index","body":" Punto Modules Punto Classes Punto.Punto punto Bidirectional dot notation conversion. TODO Finish tests Code is ugly as hell × Search results Close Github Repository "},"module-Punto.html":{"id":"module-Punto.html","title":"Module: Punto","body":" Punto Modules Punto Classes Punto.Punto Module: Punto Classes Punto Members &lt;static&gt; Punto.symbol :String Default notation symbol. Type: String Methods &lt;static&gt; Punto.from(object [, symbol]) Creates a new Punto instance. Parameters: Name Type Argument Description object Object Object that will be set in the instance. All operations will occur against it. symbol String &lt;optional&gt; Overrides the default notation symbol. Returns: Punto instance Type Punto &lt;static&gt; Punto.get(object, property [, symbol]) Gets an object property value from a dot notated property path. Parameters: Name Type Argument Description object Object Object to get a property. property String Property dot notated path. It may include nested objects in the path. symbol String &lt;optional&gt; Overrides the default notation symbol. Returns: Object property value. Type * &lt;static&gt; Punto.getSymbol() Gets Punto's default notation symbol. Returns: Notation symbol. Type String &lt;static&gt; Punto.normalize(object [, symbol]) Normalizes any dot notated property in the object. The dot notated property will be removed and replaced by its conversion. Parameters: Name Type Argument Description object Object Object to be normalized. symbol String &lt;optional&gt; Overrides the default notation symbol. &lt;static&gt; Punto.set(object, property [, symbol], value) Sets an object property value from a dot notated property path. Parameters: Name Type Argument Description object Object Object to have a property set. property String Property dot notated path. It may include nested objects in the path. symbol String &lt;optional&gt; Overrides the default notation symbol. value * Value to be set in the property. &lt;static&gt; Punto.setSymbol(symbol) Sets Punto's default notation symbol. Parameters: Name Type Description symbol String Overrides the default notation symbol. × Search results Close Github Repository "},"module-Punto.Punto.html":{"id":"module-Punto.Punto.html","title":"Class: Punto","body":" Punto Modules Punto Classes Punto.Punto Class: Punto Punto. Punto new Punto( [object] [, symbol]) Creates a new Punto instance. Parameters: Name Type Argument Description object Object &lt;optional&gt; Object that will be set in the instance. All operations will occur against it. symbol String &lt;optional&gt; Overrides the default notation symbol. Members &lt;protected&gt; object :Object Type: Object Default Value: null &lt;protected&gt; symbol :String Type: String Default Value: . Methods get(property) Gets an object property value from a dot notated property path. Parameters: Name Type Description property String Property dot notated path. It may include nested objects in the path. Returns: Object property value. Type * getObject() Gets instance object. Returns: Instance object. Type Object getSymbol() Gets instance notation symbol. Returns: Notation symbol. Type String normalize() Normalizes any dot notated property in the object. The dot notated property will be removed and replaced by its conversion. set(property, value) Sets an object property value from a dot notated property path. Parameters: Name Type Description property String Property dot notated path. It may include nested objects in the path. value * Value to be set in the property. setSymbol(symbol) Sets instance notation symbol. Parameters: Name Type Description symbol String Overrides instance default notation symbol. × Search results Close Github Repository "}} </script> <script type="text/javascript"> $(document).ready(function() { Searcher.init(); }); $(window).on("message", function(msg) { var msgData = msg.originalEvent.data; if (msgData.msgid != "docstrap.quicksearch.start") { return; } var results = Searcher.search(msgData.searchTerms); window.parent.postMessage({"results": results, "msgid": "docstrap.quicksearch.done"}, "*"); }); </script> </body> </html>