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

dice-mist

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dice-mist

A wrapper for the evaporate library allowing use in a web worker.

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by10%
Maintainers
1
Weekly downloads
 
Created
Source

Dice Mist

Dice Mist is a wrapper for the Evaporate library providing web worker support.

When uploading multiple large files, it is possible for the upload process to lag the main JS thread, by delegating this work to a web worker you can keep your UI snappy.

Usage

import Mist from 'dice-mist';

const config = {
    // evaporate config
    worker: true // boolean to use worker or not
};

const files = [
    // array of Javascript Files
    // you MUST add an ID to each file, so that it can be track from the worker
    // E.g: files.forEach(file => {file.id = generateId()});
];

Mist(config, files)
    .progress((progress, id) => { /* File upload % progress - number between 0 & 1 */})
    .success((id, data, awsObjectKey) => { /* fileGuid, fileData, s3 key/path */})
    .error((reason, id) => { /* error reason, errored file */})
    .start((cancel, id) => { /* function to cancel individual file upload, file id */});

How It Works

Sequence Diagram

FAQs

Package last updated on 14 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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