UNPKG

punto

Version:

Bidirectional dot notation conversion.

1,333 lines (448 loc) 15.8 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Punto Class: Punto</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top "> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="index.html">Punto</a> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse" id="topNavigation"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-Punto.html">Punto</a></li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-Punto.Punto.html">Punto.Punto</a></li> </ul> </li> </ul> <div class="col-sm-3 col-md-3"> <form class="navbar-form" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" id="search-input"> <div class="input-group-btn"> <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form> </div> </div> </div> </div> <div class="container" id="toc-content"> <div class="row"> <div class="col-md-8"> <div id="main"> <h1 class="page-title">Class: Punto</h1> <section> <header> <h2> <span class="ancestors"><a href="module-Punto.html">Punto</a>.</span> Punto </h2> </header> <article> <div class="container-overview"> <hr> <dt> <h4 class="name" id="Punto"><span class="type-signature"></span>new Punto( [object] [, symbol])</h4> </dt> <dd> <div class="description"> Creates a new Punto instance. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>object</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Object that will be set in the instance. All operations will occur against it.</td> </tr> <tr> <td class="name"><code>symbol</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Overrides the default notation symbol.</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> </div> <h3 class="subsection-title">Members</h3> <dl> <hr> <dt class="name" id="object"> <h4 id="object"><span class="type-signature">&lt;protected> </span>object<span class="type-signature"> :Object</span></h4> </dt> <dd> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <dl class="details"> <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt> <dd class="tag-default"> <ul class="dummy"> <li>null</li> </ul> </dd> </dl> </dd> <hr> <dt class="name" id="symbol"> <h4 id="symbol"><span class="type-signature">&lt;protected> </span>symbol<span class="type-signature"> :String</span></h4> </dt> <dd> <h5>Type:</h5> <ul> <li> <span class="param-type">String</span> </li> </ul> <dl class="details"> <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt> <dd class="tag-default"> <ul class="dummy"> <li>.</li> </ul> </dd> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <dl> <hr> <dt> <h4 class="name" id="get"><span class="type-signature"></span>get(property)</h4> </dt> <dd> <div class="description"> Gets an object property value from a dot notated property path. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Property dot notated path. It may include nested objects in the path.</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> Object property value. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getObject"><span class="type-signature"></span>getObject()</h4> </dt> <dd> <div class="description"> Gets instance object. </div> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> Instance object. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="getSymbol"><span class="type-signature"></span>getSymbol()</h4> </dt> <dd> <div class="description"> Gets instance notation symbol. </div> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> Notation symbol. </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id="normalize"><span class="type-signature"></span>normalize()</h4> </dt> <dd> <div class="description"> Normalizes any dot notated property in the object. The dot notated property will be removed and replaced by its conversion. </div> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="set"><span class="type-signature"></span>set(property, value)</h4> </dt> <dd> <div class="description"> Sets an object property value from a dot notated property path. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>property</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Property dot notated path. It may include nested objects in the path.</td> </tr> <tr> <td class="name"><code>value</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last">Value to be set in the property.</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <hr> <dt> <h4 class="name" id="setSymbol"><span class="type-signature"></span>setSymbol(symbol)</h4> </dt> <dd> <div class="description"> Sets instance notation symbol. </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>symbol</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Overrides instance default notation symbol.</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> </dl> </article> </section> </div> </div> <div class="clearfix"></div> <div class="col-md-3"> <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div> </div> </div> </div> <div class="modal fade" id="searchResults"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Search results</h4> </div> <div class="modal-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <footer> <span style="text-align: center; width: 100%; display: block;"><a href="https://github.com/rodrigogs/punto">Github Repository</a></span> <span class="copyright"> Punto Copyright (c) 2017 Rodrigo Gomes da Silva. All rights reserved. </span> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on 2017-01-30T11:08:25-02:00 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>. </span> </footer> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/toc.js"></script> <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script> <script> $( function () { $( "[id*='$']" ).each( function () { var $this = $( this ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); } ); $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () { var $this = $( this ); var example = $this.find( "code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html( exampleText ); lang = lang[1]; } else { var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/); lang = langClassMatch ? langClassMatch[1] : "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : false, showMenu : true, enableDoclinks : true } ); $.catchAnchorLinks( { navbarOffset: 10 } ); $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4", showAndHide : false, smoothScrolling: true } ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $( '.dropdown-toggle' ).dropdown(); $( "table" ).each( function () { var $this = $( this ); $this.addClass('table'); } ); } ); </script> <!--Navigation and Symbol Display--> <script> $( function () { $( '#main' ).localScroll( { offset : { top : 60 } //offset by the height of your header (give or take a few px, see what works for you) } ); $( "dt.name" ).each( function () { var $this = $( this ).find("h4"); var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" ); var dt = $(this); var children = dt.next( "dd" ); dt.prepend( icon ).css( {cursor : "pointer"} ); dt.addClass( "member-collapsed" ).addClass( "member" ); children.hide(); dt.children().on( "click", function () { children = dt.next( "dd" ); children.slideToggle( "fast", function () { if ( children.is( ":visible" ) ) { icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" ); dt.addClass( "member-open" ).animate( "member-collapsed" ); } else { icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" ); dt.addClass( "member-collapsed" ).removeClass( "member-open" ); } } ); } ); } ); } ); </script> <!--Google Analytics--> <script type="text/javascript"> $(document).ready(function() { SearcherDisplay.init(); }); </script> </body> </html>