Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remotestorage-module-shares

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remotestorage-module-shares - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

.jshintrc

64

dist/build.js

@@ -63,11 +63,9 @@ (function webpackUniversalModuleDefinition(root, factory) {

/**
* File: Shares
* A remoteStorage data module for sharing of files.
*
* Maintainer: - Sebastian Kippe <sebastian@kip.pe>
* Version: - 0.3.0
* All shares are stored with a timestamp prefix. For images, thumbnails are
* created and stored in a subdirectory.
*
* Manages sharing of files. All shares are stored with a timestamp prefix.
* For images, thumbnails are created and stored in a subdirectory.
* @module shares
*/
var sharesBuilder = function sharesBuilder(privateClient, publicClient) {

@@ -77,14 +75,13 @@

/**
* Method: storeFile
*
* Stores a shared file
*
* Parameters:
* mimeType - the picture MIME type.
* name - the picture name.
* data - the picture (expected as an `ArrayBuffer`).
* @param {string} mimeType - Content type of the file
* @param {string} name - Filename
* @param {ArrayBuffer} data - File contents
*
* Returns:
* A promise, which will be fulfilled with the absolute URL of the newly
* uploaded file (see <getFileURL>).
* @returns {Promise} A promise, which will be fulfilled with the absolute
* URL of the newly uploaded file (see <getFileURL>)
*
* @alias module:shares
* @public
*/

@@ -105,8 +102,8 @@ storeFile: function storeFile(mimeType, name, data) {

/**
* Method: remove
*
* Remove a file
*
* Parameters:
* name - the filename.
* @param {string} name - The filename
*
* @alias module:shares
* @public
*/

@@ -119,8 +116,8 @@ remove: function remove(name) {

/**
* Method: listFiles
*
* List all shared files
*
* Returns:
* An array containing the filenames.
* @returns {Promise} Resolves with an array containing the filenames
*
* @alias module:shares
* @public
*/

@@ -141,11 +138,10 @@ list: function list() {

/**
* Method: getFileURL
*
* Get the absolute URL of a file.
*
* Parameters:
* name - the filename.
* @param {string} name - the filename
*
* Returns:
* The absolute URL of the file.
* @returns {string} The absolute URL of the file
*
* @alias module:shares
* @public
*/

@@ -161,11 +157,9 @@ getFileURL: function getFileURL(name) {

/**
* Method: _formattedDate
*
* Helper method for formatting dates for filenames
*
* Parameters:
* date - a Date object
* @param {date} date - a Date object
*
* Returns:
* A formatted date string, like e.g. '131106-1523'
* @returns {string} A formatted date string, like e.g. '131106-1523'
*
* @private
*/

@@ -172,0 +166,0 @@

/**
* File: Shares
* A remoteStorage data module for sharing of files.
*
* Maintainer: - Sebastian Kippe <sebastian@kip.pe>
* Version: - 0.3.0
* All shares are stored with a timestamp prefix. For images, thumbnails are
* created and stored in a subdirectory.
*
* Manages sharing of files. All shares are stored with a timestamp prefix.
* For images, thumbnails are created and stored in a subdirectory.
* @module shares
*/
const sharesBuilder = function(privateClient, publicClient) {

@@ -15,14 +13,13 @@

/**
* Method: storeFile
*
* Stores a shared file
*
* Parameters:
* mimeType - the picture MIME type.
* name - the picture name.
* data - the picture (expected as an `ArrayBuffer`).
* @param {string} mimeType - Content type of the file
* @param {string} name - Filename
* @param {ArrayBuffer} data - File contents
*
* Returns:
* A promise, which will be fulfilled with the absolute URL of the newly
* uploaded file (see <getFileURL>).
* @returns {Promise} A promise, which will be fulfilled with the absolute
* URL of the newly uploaded file (see <getFileURL>)
*
* @alias module:shares
* @public
*/

@@ -44,8 +41,8 @@ storeFile: function(mimeType, name, data) {

/**
* Method: remove
*
* Remove a file
*
* Parameters:
* name - the filename.
* @param {string} name - The filename
*
* @alias module:shares
* @public
*/

@@ -58,8 +55,8 @@ remove: function(name) {

/**
* Method: listFiles
*
* List all shared files
*
* Returns:
* An array containing the filenames.
* @returns {Promise} Resolves with an array containing the filenames
*
* @alias module:shares
* @public
*/

@@ -81,11 +78,10 @@ list: function() {

/**
* Method: getFileURL
*
* Get the absolute URL of a file.
*
* Parameters:
* name - the filename.
* @param {string} name - the filename
*
* Returns:
* The absolute URL of the file.
* @returns {string} The absolute URL of the file
*
* @alias module:shares
* @public
*/

@@ -101,11 +97,9 @@ getFileURL: function(name) {

/**
* Method: _formattedDate
*
* Helper method for formatting dates for filenames
*
* Parameters:
* date - a Date object
* @param {date} date - a Date object
*
* Returns:
* A formatted date string, like e.g. '131106-1523'
* @returns {string} A formatted date string, like e.g. '131106-1523'
*
* @private
*/

@@ -112,0 +106,0 @@

{
"name": "remotestorage-module-shares",
"version": "2.0.0",
"version": "2.1.0",
"description": "remoteStorage.js module for sharing images and other files",

@@ -9,3 +9,5 @@ "main": "./dist/build.js",

"dev": "webpack -w",
"build": "NODE_ENV=production webpack"
"build": "NODE_ENV=production webpack",
"docs": "jsdoc2md --partial main.hbs --files index.js > README.md",
"version": "npm run build && git add dist/ && npm run docs && git add README.md"
},

@@ -21,2 +23,3 @@ "author": "Sebastian Kippe <sebastian@kip.pe>",

"babel-preset-es2015": "^6.18.0",
"jsdoc-to-markdown": "^3.0.0",
"webpack": "^1.13.2"

@@ -23,0 +26,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc