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

@scoir/filestack

Package Overview
Dependencies
Maintainers
27
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scoir/filestack - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0-beta.ed162590

dist/index.spec.js

12

dist/default-picker-options.js

@@ -1,9 +0,5 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
maxSize: 10 * 1024 * 1024, // 10MB of bytes for filesize limits
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json'
export default {
maxSize: 10 * 1024 * 1024,
// 10MB of bytes for filesize limits
customText: 'https://s3.amazonaws.com/scoir_static/assets/js/scoir_fp_en.json'
};

@@ -1,10 +0,5 @@

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
CSV: ['.csv'],
ZIP: ['.zip'],
PDF: ['.pdf']
export default {
CSV: ['.csv'],
ZIP: ['.zip'],
PDF: ['.pdf']
};

@@ -1,57 +0,34 @@

'use strict';
import filestackFileExtensions from './file-extensions';
import filestackDefaultPickerOptions from './default-picker-options';
Object.defineProperty(exports, "__esModule", {
value: true
const createWrapper = filestack => ({ ...filestack,
upload: (file, storeOptions) => {
return new Promise((resolve, reject) => {
filestack.store(file, storeOptions, resolve, reject);
});
},
export: handle => {
return new Promise(resolve => {
filestack.exportFile(handle, resolve, resolve);
});
},
exportUrl: (url, opts) => {
return new Promise(resolve => {
filestack.exportFile(url, opts, resolve, resolve);
});
},
pickAndStore: (pickerOptions, storeOptions) => {
return new Promise((resolve, reject) => {
filestack.pickAndStore({ ...filestackDefaultPickerOptions,
...pickerOptions
}, storeOptions, resolve, reject);
});
}
});
exports.defaultPickerOptions = exports.fileExtensions = undefined;
var _promise = require('babel-runtime/core-js/promise');
var _promise2 = _interopRequireDefault(_promise);
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
var _fileExtensions = require('./file-extensions');
var _fileExtensions2 = _interopRequireDefault(_fileExtensions);
var _defaultPickerOptions = require('./default-picker-options');
var _defaultPickerOptions2 = _interopRequireDefault(_defaultPickerOptions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createWrapper = function createWrapper(filestack) {
return (0, _assign2.default)({}, filestack, {
upload: function upload(file, storeOptions) {
return new _promise2.default(function (resolve, reject) {
filestack.store(file, storeOptions, resolve, reject);
});
},
export: function _export(handle) {
return new _promise2.default(function (resolve) {
filestack.exportFile(handle, resolve, resolve);
});
},
exportUrl: function exportUrl(url, opts) {
return new _promise2.default(function (resolve) {
filestack.exportFile(url, opts, resolve, resolve);
});
},
pickAndStore: function pickAndStore(pickerOptions, storeOptions) {
return new _promise2.default(function (resolve, reject) {
filestack.pickAndStore((0, _assign2.default)({}, _defaultPickerOptions2.default, pickerOptions), storeOptions, resolve, reject);
});
}
});
};
exports.default = function (key, filestack) {
filestack.setKey(key);
return createWrapper(filestack);
};
var fileExtensions = exports.fileExtensions = _fileExtensions2.default;
var defaultPickerOptions = exports.defaultPickerOptions = _defaultPickerOptions2.default;
export default ((key, filestack) => {
filestack.setKey(key);
return createWrapper(filestack);
});
export const fileExtensions = filestackFileExtensions;
export const defaultPickerOptions = filestackDefaultPickerOptions;
{
"name": "@scoir/filestack",
"version": "2.3.0",
"version": "3.0.0-beta.ed162590",
"description": "",

@@ -5,0 +5,0 @@ "author": "@scoir",

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