Comparing version 0.2.3 to 0.2.4
@@ -9,4 +9,14 @@ 'use strict'; | ||
/** | ||
* Giga | ||
*/ | ||
class Giga { | ||
/** | ||
* Create a new Giga instance. | ||
* | ||
* @param {Object} options={} - The configurations of Giga. | ||
* @param {Object} options.storage - The storage instance. | ||
*/ | ||
constructor(options = {}) { | ||
debug('create an instance'); | ||
this.storage = options.storage; | ||
@@ -16,12 +26,10 @@ | ||
throw new Error('Storage must be provided'); | ||
debug('create an instance'); | ||
} | ||
/** | ||
* Download file from the storage | ||
* Download file from the storage. | ||
* | ||
* @param {string} filePath | ||
* @param {Writable} dst | ||
* @param {object} options | ||
* @param {string} filePath - The file path to download. | ||
* @param {stream.Writable} dst - The destination stream. | ||
* @param {Object} [options={}] - The download options. | ||
* @returns {Promise} | ||
@@ -54,6 +62,8 @@ */ | ||
/** | ||
* Upload file to the storage | ||
* Upload file to the storage. | ||
* | ||
* @param {Stream} src | ||
* @param {object} options | ||
* @param {stream.Readable} src - The source stream. | ||
* @param {Object} [options={}] - The upload options. | ||
* @param {string} [options.directory] - The directory to upload. | ||
* @param {string} [options.filename] - The file name to upload. | ||
* @returns {Promise} | ||
@@ -80,6 +90,6 @@ */ | ||
/** | ||
* Remove the data from storage | ||
* Remove the data from storage. | ||
* | ||
* @param {string} filePath | ||
* @returns {promise} | ||
* @param {string} filePath - The file path to remove. | ||
* @returns {Promise} | ||
*/ | ||
@@ -86,0 +96,0 @@ remove(filePath) { |
{ | ||
"name": "giga", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Easy streaming upload and download for storages(File System, AWS S3)", | ||
@@ -46,12 +46,12 @@ "license": "MIT", | ||
"dependencies": { | ||
"aws-sdk": "^2.114.0", | ||
"debug": "^3.0.0", | ||
"aws-sdk": "^2.170.0", | ||
"debug": "^3.1.0", | ||
"uuid": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.13.1", | ||
"eslint": "^4.5.0", | ||
"eslint-config-omnious": "^0.3.0", | ||
"jest": "^21.0.2" | ||
"coveralls": "^3.0.0", | ||
"eslint": "^4.13.1", | ||
"eslint-config-omnious": "^0.3.1", | ||
"jest": "^21.2.1" | ||
} | ||
} |
@@ -36,5 +36,5 @@ 'use strict'; | ||
/** | ||
* Create a new storage instance | ||
* Create a new storage instance. | ||
* | ||
* @param {object} options | ||
* @param {Object} [options={}] - The configuration of LocalStorage. | ||
*/ | ||
@@ -58,6 +58,6 @@ constructor(options = {}) { | ||
/** | ||
* Create a readable stream to download the data from | ||
* Create a readable stream to download the data from. | ||
* | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @param {string} filePath - The file path to download. | ||
* @param {Object} [options={}] - The download options. | ||
* @returns {Promise} | ||
@@ -79,7 +79,7 @@ */ | ||
/** | ||
* Upload the data as a readable stream to | ||
* Upload the data as a readable stream to. | ||
* | ||
* @param {stream} src | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @param {stream.Readable} src - The source stream. | ||
* @param {string} filePath - The file path to upload. | ||
* @param {Object} [options={}] - The upload options. | ||
* @returns {Promise} | ||
@@ -105,7 +105,6 @@ */ | ||
/** | ||
* Remove the data from storage | ||
* Remove the data from storage. | ||
* | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @returns {promise} | ||
* @param {string} filePath - The file path to remove. | ||
* @returns {Promise} | ||
*/ | ||
@@ -112,0 +111,0 @@ remove(filePath) { |
@@ -13,5 +13,5 @@ 'use strict'; | ||
/** | ||
* Create a new storage instance | ||
* Create a new storage instance. | ||
* | ||
* @param {object} options | ||
* @param {Object} [options={}] - The configuration of LocalStorage. | ||
*/ | ||
@@ -39,6 +39,6 @@ constructor(options = {}) { | ||
/** | ||
* Create a readable stream to download the data from | ||
* Create a readable stream to download the data from. | ||
* | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @param {string} filePath - The file path to download. | ||
* @param {Object} [options={}] - The download options. | ||
* @returns {Promise} | ||
@@ -62,7 +62,7 @@ */ | ||
/** | ||
* Upload the data as a readable stream to | ||
* Upload the data as a readable stream to. | ||
* | ||
* @param {stream} src | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @param {stream.Readable} src - The source stream. | ||
* @param {string} filePath - The file path to upload. | ||
* @param {Object} [options={}] - The upload options. | ||
* @returns {Promise} | ||
@@ -82,6 +82,5 @@ */ | ||
/** | ||
* Remove the data from storage | ||
* Remove the data from storage. | ||
* | ||
* @param {string} filePath | ||
* @param {object} options | ||
* @param {string} filePath - The file path to remove. | ||
* @returns {Promise} | ||
@@ -88,0 +87,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13301
8
277
Updatedaws-sdk@^2.170.0
Updateddebug@^3.1.0