Skip to content

Commit

Permalink
move files
Browse files Browse the repository at this point in the history
  • Loading branch information
mastashake08 committed Oct 15, 2023
1 parent 1d771e1 commit 7c483e5
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
File renamed without changes.
9 changes: 9 additions & 0 deletions classes/ShakeCompressionStream.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ShakeCompressionStream extends CompressionStream {
constructor(format="gzip") {
super(format)
}
}

export {
ShakeCompressionStream
}
9 changes: 9 additions & 0 deletions classes/ShakeDecompressionStream.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class ShakeDecompressionStream extends DecompressionStream {
constructor(format="gzip") {
super(format)
}
}

export {
ShakeDecompressionStream
}
9 changes: 8 additions & 1 deletion ShakeFile.js → classes/ShakeFile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { ShakeCompressionStream } from "./ShakeCompressionStream";
import { ShakeDecompressionStream } from "./ShakeDecompressionStream";

/**
* @file Class representing the ShakeFile base class.
* @copyright Jyrone Parker 2023
Expand All @@ -15,12 +18,16 @@ class ShakeFile {

encodedData;
decodedData;
constructor ({file = null, showDom = false}) {
#compressionStream;
#decompressionStream;
constructor ({file = null, showDom = false, compressionFormat="gzip", decompressionFormat="gzip"}) {
this.file = file
this.showDom = showDom
if(this.showDom) {
this.addToDom()
}
this.#compressionStream = new ShakeCompressionStream(compressionFormat);
this.#decompressionStream = new ShakeDecompressionStream(decompressionFormat);
}
/**
* @function addToDom
Expand Down
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { FileSystem } from './FileSystem'
import { ShakeFile } from './ShakeFile'
import { FileSystem } from './classes/FileSystem'
import { ShakeFile } from './classes/ShakeFile'
import { ShakeCompressionStream } from './classes/ShakeCompressionStream'
import { ShakeDecompressionStream } from './classes/ShakeDecompressionStream'
export {
FileSystem,
ShakeFile
ShakeFile,
ShakeDecompressionStream,
ShakeCompressionStream
}
4 changes: 2 additions & 2 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.5",
"version": "1.5.0",
"description": "Pure Javascript package for using the File System API",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7c483e5

Please sign in to comment.