Skip to content

Commit cc74603

Browse files
author
Philipp Alferov
committed
Fix source code comments
1 parent fbf3c0a commit cc74603

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/angular-file-saver.service.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ module.exports = function FileSaver(Blob, SaveAs, FileSaverUtils) {
1919
/**
2020
* saveAs - Immediately starts saving a file, returns undefined.
2121
*
22-
* @param {object} config Set of options such as filename and Blob options.
22+
* @param {object} options Set of options such as filename and data.
2323
* @return {undefined}
24+
*
25+
* ##### Params on the `options` object:
26+
* - filename (string): Custom filename (extension is optional).
27+
* - data (Blob): A Blob instance.
2428
*/
2529

26-
saveAs: function(config) {
27-
config = angular.extend({}, config);
28-
var data = config.data;
29-
var filename = config.filename;
30+
saveAs: function(options) {
31+
options = angular.extend({}, options);
32+
var data = options.data;
33+
var filename = options.filename;
3034

3135
if (!isBlobInstance(data)) {
3236
FileSaverUtils.handleErrors('Data argument should be a blob instance');

0 commit comments

Comments
 (0)