Skip to content

Commit

Permalink
v1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mastashake08 committed Oct 13, 2023
1 parent cd8f23d commit b79713b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 12 deletions.
19 changes: 12 additions & 7 deletions ShakeFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@
* @file Class representing the ShakeFile base class.
* @copyright Jyrone Parker 2023
* @author Jyrone Parker <jyrone.parker@gmail.com>
* @version 1.4.2
* @version 1.4.4
*/
class ShakeFile {
/**
* Create a ShakeFile.
* @class ShakeFile
* @param {object} config - The config object.
* @param {File | Blob| null} config.file - The File/Blob to be acted on
* @param {Boolean} config.showDom - Boolean flag to determin if DOM elements should be created
*/
constructor ({file = null, obj = null, showDom = false}) {

encodedData;
decodedData;
constructor ({file = null, showDom = false}) {
this.file = file
this.obj = obj

this.encodedData = null
this.decodedData = ''
this.showDom = showDom
if(this.showDom) {
this.addToDom()
}
}

/**
* @function addToDom
* Add file elements to DOM.
* @return {void} - no return type
*/
addToDom () {
this.mainDiv = document.createElement('div')
this.mainDiv.id = 'main-div'
Expand Down
26 changes: 25 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## Classes

<dl>
<dt><a href="#ShakeFile">ShakeFile</a></dt>
<dd></dd>
</dl>

## Functions

<dl>
<dt><a href="#addToDom
Add file elements to DOM.">addToDom
Add file elements to DOM.()</a> ⇒ <code>void</code></dt>
<dd></dd>
</dl>

<a name="ShakeFile"></a>

## ShakeFile
Expand All @@ -17,9 +33,17 @@ Create a ShakeFile.
| --- | --- | --- |
| config | <code>object</code> | The config object. |
| config.file | <code>File</code> \| <code>Blob</code> \| <code>null</code> | The File/Blob to be acted on |
| config.showDom | <code>Boolean</code> | Boolean flag to determin if DOM elements should be created |

<a name="ShakeFile+saveFile"></a>

### shakeFile.saveFile() ⇒
**Kind**: instance method of [<code>ShakeFile</code>](#ShakeFile)
**Returns**: Boolean
**Returns**: Boolean
<a name="addToDom
Add file elements to DOM."></a>

## addToDom
Add file elements to DOM.() ⇒ <code>void</code>
**Kind**: global function
**Returns**: <code>void</code> - - no return type
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shake-file",
"version": "1.4.2",
"version": "1.4.4",
"description": "Pure Javascript package for using the File System API",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit b79713b

Please sign in to comment.