Skip to content

Commit 7bea5e2

Browse files
committed
Updated dependencies, more tidy up
1 parent a5d9392 commit 7bea5e2

File tree

3 files changed

+245
-185
lines changed

3 files changed

+245
-185
lines changed

lib/save.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import dateformat from 'dateformat';
2-
import assign from 'object-assign';
32
import padLeft from 'pad-left';
43
import { getClientAPI } from './util';
54

@@ -21,15 +20,15 @@ const supportedEncodings = [
2120

2221
function stream (isStart, opts = {}) {
2322
return new Promise((resolve, reject) => {
24-
opts = assign({}, defaultExts, opts);
23+
opts = Object.assign({}, defaultExts, opts);
2524
const filename = resolveFilename(Object.assign({}, opts, {
2625
extension: '',
2726
frame: undefined
2827
}));
2928
const func = isStart ? 'streamStart' : 'streamEnd';
3029
const client = getClientAPI();
3130
if (client && client.output && typeof client[func] === 'function') {
32-
return client[func](assign({}, opts, { filename }))
31+
return client[func](Object.assign({}, opts, { filename }))
3332
.then(ev => resolve(ev));
3433
} else {
3534
return resolve({ filename, client: false });
@@ -85,13 +84,13 @@ export function saveDataURL (dataURL, opts = {}) {
8584

8685
export function saveBlob (blob, opts = {}) {
8786
return new Promise(resolve => {
88-
opts = assign({}, defaultExts, opts);
87+
opts = Object.assign({}, defaultExts, opts);
8988
const filename = opts.filename;
9089

9190
const client = getClientAPI();
9291
if (client && typeof client.saveBlob === 'function' && client.output) {
9392
// native saving using a CLI tool
94-
return client.saveBlob(blob, assign({}, opts, { filename }))
93+
return client.saveBlob(blob, Object.assign({}, opts, { filename }))
9594
.then(ev => resolve(ev));
9695
} else {
9796
// force download
@@ -135,7 +134,7 @@ export function getDefaultFile (prefix = '', suffix = '', ext) {
135134
}
136135

137136
export function resolveFilename (opt = {}) {
138-
opt = assign({}, opt);
137+
opt = Object.assign({}, opt);
139138

140139
// Custom filename function
141140
if (typeof opt.file === 'function') {

0 commit comments

Comments
 (0)