Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Commit

Permalink
Documentation 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelio Merenda committed Oct 16, 2018
1 parent bd7a55e commit 73f2397
Show file tree
Hide file tree
Showing 74 changed files with 33,444 additions and 0 deletions.
570 changes: 570 additions & 0 deletions docs/1.0.0/JsBrowser.html

Large diffs are not rendered by default.

Binary file added docs/1.0.0/fonts/OpenSans-Bold-webfont.eot
Binary file not shown.
1,830 changes: 1,830 additions & 0 deletions docs/1.0.0/fonts/OpenSans-Bold-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-Bold-webfont.woff
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-BoldItalic-webfont.eot
Binary file not shown.
1,830 changes: 1,830 additions & 0 deletions docs/1.0.0/fonts/OpenSans-BoldItalic-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-BoldItalic-webfont.woff
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-Italic-webfont.eot
Binary file not shown.
1,830 changes: 1,830 additions & 0 deletions docs/1.0.0/fonts/OpenSans-Italic-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-Italic-webfont.woff
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-Light-webfont.eot
Binary file not shown.
1,831 changes: 1,831 additions & 0 deletions docs/1.0.0/fonts/OpenSans-Light-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-Light-webfont.woff
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-LightItalic-webfont.eot
Binary file not shown.
1,835 changes: 1,835 additions & 0 deletions docs/1.0.0/fonts/OpenSans-LightItalic-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-Regular-webfont.eot
Binary file not shown.
1,831 changes: 1,831 additions & 0 deletions docs/1.0.0/fonts/OpenSans-Regular-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-Regular-webfont.woff
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-Semibold-webfont.eot
Binary file not shown.
1,830 changes: 1,830 additions & 0 deletions docs/1.0.0/fonts/OpenSans-Semibold-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/1.0.0/fonts/OpenSans-Semibold-webfont.ttf
Binary file not shown.
Binary file added docs/1.0.0/fonts/OpenSans-Semibold-webfont.woff
Binary file not shown.
Binary file not shown.
1,830 changes: 1,830 additions & 0 deletions docs/1.0.0/fonts/OpenSans-SemiboldItalic-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
96 changes: 96 additions & 0 deletions docs/1.0.0/getQueryParams_index.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>getQueryParams/index.js - Documentation</title>

<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="JsBrowser.html">JsBrowser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getPrevPage">getPrevPage</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getQueryParams">getQueryParams</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.shiftPage">shiftPage</a></span></li>
</nav>

<div id="main">

<h1 class="page-title">getQueryParams/index.js</h1>







<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @memberof JsBrowser
* @function getQueryParams
* @description Return the query params object (this will work only if query params
* are after the hashbang)
* @returns {Object} {queryParamsKey1: queryParamsValue1, queryParamsKey2: queryParamsValue2... }

*
* @example
* import Browser from 'js-browser';
*
*
* const queryParams = Browser.getQueryParams();
*/

export default () => {
// take from BarneyBrowser.getQueryParams, we can change this after
const url = window.location.href;
const vars = {};
let hash;

if (url.indexOf('?') !== -1) {
const querystring = url.slice(url.indexOf('?') + 1);
if (querystring) {
const hashes = querystring.split('&amp;');

for (let i = 0; i &lt; hashes.length; i += 1) {
if (hashes[i].indexOf('=') !== -1) {
hash = hashes[i].split('=');

vars[hash[0]] = window.decodeURIComponent(hash[1]);
}
}
}
}
return vars;
};</code></pre>
</article>
</section>




</div>

<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Oct 16 2018 12:35:14 GMT+0200 (CEST) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
88 changes: 88 additions & 0 deletions docs/1.0.0/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Home - Documentation</title>

<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="JsBrowser.html">JsBrowser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getPrevPage">getPrevPage</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getQueryParams">getQueryParams</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.shiftPage">shiftPage</a></span></li>
</nav>

<div id="main">



















<section class="readme">
<article><h2>js-browser</h2><p><a href="https://travis-ci.com/docomodigital/js-browser"><img src="https://travis-ci.com/docomodigital/js-browser.svg?branch=master" alt="Build Status"></a>
<a href="https://coveralls.io/github/docomodigital/js-browser?branch=master"><img src="https://coveralls.io/repos/github/docomodigital/js-browser/badge.svg?branch=master" alt="Coverage Status"></a>
<a href="https://badge.fury.io/js/%40docomodigital%2Fjs-browser"><img src="https://badge.fury.io/js/%40docomodigital%2Fjs-browser.svg" alt="npm version"></a>
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/docomodigital/js-browser.svg" alt="Greenkeeper badge"></a></p>
<p>Provides you an alternative method to manage previous and current page changements.</p>
<p>Is particularly used to get query params as object and to get the previous page in order to implement an easy and basic history in your routing.</p>
<h2>Usage</h2><pre class="prettyprint source lang-javascript"><code>import { Browser } from 'js-browser';

// Get previous page
const prevPage = Browser.getPrevPage();

// Set browser new state
Browser.shiftPage('/home');

// Get query params in your url
const queryParams = Browser.getQueryParams();</code></pre><h2>Installation</h2><h3>NPM</h3><pre class="prettyprint source lang-bash"><code>npm install --save @docomodigital/js-browser</code></pre><h2>Documentation</h2><p>To read documentation, go to:</p>
<p><a href="http://docomodigital.github.io/js-browser/latest">http://docomodigital.github.io/js-browser/latest</a></p>
<p>or run the following command insite the js-browser folder: </p>
<pre class="prettyprint source lang-bash"><code>npm run doc:open</code></pre></article>
</section>






</div>

<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Oct 16 2018 12:35:14 GMT+0200 (CEST) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
129 changes: 129 additions & 0 deletions docs/1.0.0/index.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>index.js - Documentation</title>

<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="JsBrowser.html">JsBrowser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getPrevPage">getPrevPage</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.getQueryParams">getQueryParams</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="JsBrowser.html#.shiftPage">shiftPage</a></span></li>
</nav>

<div id="main">

<h1 class="page-title">index.js</h1>







<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @class JsBrowser
* @description JsBrowser provides you an alternative method to manage previous
* and current page changements. Is particularly used to get query params as
* object and to get the previous page in order to implement an easy and basic history
* in your routing
*/

import getQueryParams from './getQueryParams';

class Browser {
constructor() {
this.currentPage = null;
this.prevPage = null;

/**
* @see modules/getQueryParams
*/
this.getQueryParams = getQueryParams;

this.shiftPage = this.shiftPage.bind(this);
this.getPrevPage = this.getPrevPage.bind(this);
}

/**
* @memberof JsBrowser
* @function shiftPage
* @description Adapt the Browser.prevPage and Browser.currentPage
* according to route's changement.
*
* **NB:** route changements must be specified in your routing changement function observer
* @param {String} currentPage set the previous page to the actual Browser.currentPage, then
* set the Browser.currentPage to the given new value
*
* @example
* // Browser.shiftPage();
*
* import Browser from 'js-browser';
*
*
* Browser.shiftPage('/newPage');
*/
shiftPage(currentPage) {
if (currentPage &amp;&amp; this.currentPage !== currentPage) {
this.prevPage = this.currentPage;
this.currentPage = currentPage;
}
}

/**
* @memberof JsBrowser
* @function getPrevPage
* @description Return the previous page you visited, if is empty, then returns null.
*
* @returns {String} previous page visited (ie: '/home')
*
* @example
* // Browser.getPrevPage();
*
* import Browser from 'js-browser';
*
*
* const prevPage = Browser.getPrevPage(); // '/home'
*/
getPrevPage() {
return this.prevPage;
}
}

export default new Browser();</code></pre>
</article>
</section>




</div>

<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Oct 16 2018 12:35:14 GMT+0200 (CEST) using the Minami theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
25 changes: 25 additions & 0 deletions docs/1.0.0/scripts/linenumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*global document */
(function() {
var source = document.getElementsByClassName('prettyprint source linenums');
var i = 0;
var lineNumber = 0;
var lineId;
var lines;
var totalLines;
var anchorHash;

if (source && source[0]) {
anchorHash = document.location.hash.substring(1);
lines = source[0].getElementsByTagName('li');
totalLines = lines.length;

for (; i < totalLines; i++) {
lineNumber++;
lineId = 'line' + lineNumber;
lines[i].id = lineId;
if (lineId === anchorHash) {
lines[i].className += ' selected';
}
}
}
})();
Loading

0 comments on commit 73f2397

Please sign in to comment.