Permalink
Browse files

documentation about the optional `new` operator

See #93 for more informations.
  • Loading branch information...
1 parent 86c4cb4 commit 35b2657e9af9272b07cbca10029eaab8c48df400 @dduponchel dduponchel committed Feb 22, 2014
Showing with 8 additions and 2 deletions.
  1. +8 −2 index.html
View
@@ -252,15 +252,19 @@
<h2 style="margin-top: 2em;">Documentation</h2>
- <h4 id="doc_new_JSZip">new JSZip()</h4>
+ <h4 id="doc_new_JSZip">new JSZip() or JSZip()</h4>
<dl>
<dt>Description : </dt>
<dd>The default constructor.</dd>
<dt>Returns : </dt>
<dd>A new JSZip.</dd>
</dl>
+ <pre class="example">
+var zip = new JSZip();
+// same as
+var zip = JSZip();</pre>
- <h4 id="doc_new_JSZip_data_options">new JSZip(data [,options])</h4>
+ <h4 id="doc_new_JSZip_data_options">new JSZip(data [,options]) or JSZip(data [,options])</h4>
<dl>
<dt>Description : </dt>
<dd>Create a new JSZip file and load an existing zip file. See the documentation of <a href="#doc_load_data_options"><code>load()</code></a> for more details and <a href="#zip_load_limits">this</a> for the limitations.</dd>
@@ -273,6 +277,8 @@ <h4 id="doc_new_JSZip_data_options">new JSZip(data [,options])</h4>
<pre class="example">
new JSZip(zipDataFromXHR, {base64:false});
// same as
+JSZip(zipDataFromXHR, {base64:false});
+// same as
var zip = new JSZip();
zip.load(zipDataFromXHR, {base64:false});</pre>

0 comments on commit 35b2657

Please sign in to comment.