New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@scoir/filestack

Package Overview
Dependencies
Maintainers
6
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.0.1 to 2.2.0

5

dist/index.js

@@ -34,2 +34,7 @@ 'use strict';

},
exportUrl: function exportUrl(url, opts) {
return new _promise2.default(function (resolve) {
filestack.exportFile(url, opts, resolve, resolve);
});
},
pickAndStore: function pickAndStore(pickerOptions, storeOptions) {

@@ -36,0 +41,0 @@ return new _promise2.default(function (resolve, reject) {

@@ -19,2 +19,7 @@ import filestackFileExtensions from './file-extensions'

},
exportUrl: (url, opts) => {
return new Promise(resolve => {
filestack.exportFile(url, opts, resolve, resolve);
});
},
pickAndStore: (pickerOptions, storeOptions) => {

@@ -21,0 +26,0 @@ return new Promise((resolve, reject) => {

@@ -24,2 +24,3 @@ import filepickerFactory, { fileExtensions } from './index';

export: expect.any(Function),
exportUrl: expect.any(Function),
pickAndStore: expect.any(Function),

@@ -98,2 +99,25 @@ makeDropPane: expect.any(Function),

});
describe('# exportUrl', () => {
let filestack;
beforeEach(() => {
filestack = createFilepicker()
})
it('should upload the specified file with options', () => {
filestack.exportUrl('url', {with: 'options'});
expect(filestackInstance.exportFile).toHaveBeenCalledWith(
'url',
{with: 'options'},
expect.any(Function),
expect.any(Function),
);
})
it('should return a promise that resolves with filestack\'s onSuccess', async () => {
const spy = jest.fn()
const result = filestack.exportUrl();
result.then(spy);
filestackInstance.exportFile.mock.calls[0][2]('result');
await result;
expect(spy).toHaveBeenCalledWith('result');
})
});
describe('# pickAndStore', () => {

@@ -100,0 +124,0 @@ let filestack;

2

package.json
{
"name": "@scoir/filestack",
"version": "2.0.1",
"version": "2.2.0",
"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