UNPKG

angular-file-saver

Version:

An AngularJS service that implements the HTML5 W3C saveAs() in browsers that do not natively support it

19 lines (17 loc) 405 B
'use strict'; module.exports = function FileSaverUtils() { return { handleErrors: function(msg) { throw new Error(msg); }, isString: function(obj) { return typeof obj === 'string' || obj instanceof String; }, isUndefined: function(obj) { return typeof obj === 'undefined'; }, isBlobInstance: function(obj) { return obj instanceof Blob; } }; };