Skip to content

Commit

Permalink
Fix RIFFFile signture export
Browse files Browse the repository at this point in the history
  • Loading branch information
rochars committed Jan 2, 2020
1 parent 8abf6e1 commit 357b9b8
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 31 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# CHANGELOG

## version 0.0.1 (2019-08-09)
## version 1.0.1 (2020-01-02)
- Fix RIFFFile signature export
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ RIFFFile.chunkSize = 0;
RIFFFile.format = '';
/**
* An object representing the signature of all chunks in the file.
* @type {!Object<string, *>}
* @type {
{chunkId: string, chunkSize: number, format: string, subChunks: Array}
}
*/
RIFFFile.signature = {
/** @type {string} */
Expand Down
20 changes: 10 additions & 10 deletions dist/riff-file.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ <h3>The RIFFFile properties</h3>
RIFFFile.format = '';
/**
* An object representing the signature of all chunks in the file.
* @type {!Object&lt;string, *>}
* @type {
{chunkId: string, chunkSize: number, format: string, subChunks: Array}
}
*/
RIFFFile.signature = {
/** @type {string} */
Expand Down
13 changes: 10 additions & 3 deletions docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,16 @@ <h1 class="page-title">index.js</h1>
this.format = '';
/**
* An object representing the signature of all chunks in the file.
* @type {!Object}
* @type {
{chunkId: string, chunkSize: number, format: string, subChunks: Array}
}
*/
this.signature = {};
this.signature = {
chunkId : '',
chunkSize : 0,
format: '',
subChunks: []
};
/**
* @type {number}
* @protected
Expand Down Expand Up @@ -155,7 +162,7 @@ <h1 class="page-title">index.js</h1>
* @protected
*/
findChunk(chunkId, multiple=false) {
/** @type {!Array&lt;!Object>} */
/** @type {!Array|null} */
let chunks = this.signature.subChunks;
/** @type {!Array&lt;!Object>} */
let chunk = [];
Expand Down
18 changes: 9 additions & 9 deletions docs/module-riff-file.RIFFFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ <h4 class="name" id="head"><span class="type-signature">(protected) </span>head<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line65">line 65</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line72">line 72</a>
</li></ul></dd>


Expand Down Expand Up @@ -452,7 +452,7 @@ <h5>Type:</h5>



<h4 class="name" id="signature"><span class="type-signature">(non-null) </span>signature<span class="type-signature"> :Object</span></h4>
<h4 class="name" id="signature"><span class="type-signature"></span>signature<span class="type-signature"> :Object</span></h4>



Expand All @@ -463,7 +463,7 @@ <h4 class="name" id="signature"><span class="type-signature">(non-null) </span>s

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line60">line 60</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line62">line 62</a>
</li></ul></dd>


Expand Down Expand Up @@ -536,7 +536,7 @@ <h4 class="name" id="supported_containers"><span class="type-signature">(protect

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line79">line 79</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line86">line 86</a>
</li></ul></dd>


Expand Down Expand Up @@ -609,7 +609,7 @@ <h4 class="name" id="uInt32"><span class="type-signature">(protected) </span>uIn

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line72">line 72</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line79">line 79</a>
</li></ul></dd>


Expand Down Expand Up @@ -688,7 +688,7 @@ <h4 class="name" id="findChunk"><span class="type-signature">(protected) </span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line113">line 113</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line120">line 120</a>
</li></ul></dd>


Expand Down Expand Up @@ -877,7 +877,7 @@ <h4 class="name" id="readString"><span class="type-signature">(protected) </span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line140">line 140</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line147">line 147</a>
</li></ul></dd>


Expand Down Expand Up @@ -1058,7 +1058,7 @@ <h4 class="name" id="readUInt32"><span class="type-signature">(protected) </span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line154">line 154</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line161">line 161</a>
</li></ul></dd>


Expand Down Expand Up @@ -1216,7 +1216,7 @@ <h4 class="name" id="setSignature"><span class="type-signature">(protected) </sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line87">line 87</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line94">line 94</a>
</li></ul></dd>


Expand Down
11 changes: 9 additions & 2 deletions externs/riff-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ RIFFFile.prototype.format = '';

/**
* An object representing the signature of all chunks in the file.
* @type {!Object}
* @type {
{chunkId: string, chunkSize: number, format: string, subChunks: Array}
}
*/
RIFFFile.prototype.signature = {};
RIFFFile.prototype.signature = {
chunkId : '',
chunkSize : 0,
format: '',
subChunks: []
};

/**
* @type {number}
Expand Down
13 changes: 10 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ export class RIFFFile {
this.format = '';
/**
* An object representing the signature of all chunks in the file.
* @type {!Object}
* @type {
{chunkId: string, chunkSize: number, format: string, subChunks: Array}
}
*/
this.signature = {};
this.signature = {
chunkId : '',
chunkSize : 0,
format: '',
subChunks: []
};
/**
* @type {number}
* @protected
Expand Down Expand Up @@ -111,7 +118,7 @@ export class RIFFFile {
* @protected
*/
findChunk(chunkId, multiple=false) {
/** @type {!Array<!Object>} */
/** @type {!Array|null} */
let chunks = this.signature.subChunks;
/** @type {!Array<!Object>} */
let chunk = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "riff-file",
"version": "1.0.0",
"version": "1.0.1",
"description": "Read data from RIFF files.",
"homepage": "https://github.com/rochars/riff-file",
"author": "Rafael da Silva Rocha <rocha.rafaelsilva@gmail.com>",
Expand Down

0 comments on commit 357b9b8

Please sign in to comment.