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

@syncfusion/ej2-file-utils

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-file-utils - npm Package Compare versions

Comparing version 15.4.22 to 15.4.23

dist/es6/ej2-file-utils.es2015.js

12

CHANGELOG.md

@@ -9,2 +9,14 @@ # Changelog

- Added typing file for ES5 global scripts (dist/global/index.d.ts)
#### Breaking Changes
- Modified the module bundle file name for ES6 bundling
## 15.4.22-preview (2017-12-14)
### File
#### New Features
Upgraded TypeScript version to 2.6.2

@@ -11,0 +23,0 @@

4

dist/ej2-file-utils.umd.min.js
/*!
* filename: ej2-file-utils.umd.min.js
* version : 15.4.22
* version : 15.4.23
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,3 +11,3 @@ * Use of this code is subject to the terms of our license.

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r,o;r=[n,t,n(1),n(2),n(3)],void 0!==(o=function(e,t,n,r,o){"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n),i(r),i(o)}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t,n(2),n(3)],void 0!==(o=function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(e),r.Save.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(e.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"encoding",{get:function(){return this.enc},enumerable:!0,configurable:!0}),e.prototype.init=function(e){null===e||void 0===e?(this.enc=new n.Encoding(!1),this.enc.type="Utf8"):(this.enc=e,this.setBomByte())},e.prototype.setBomByte=function(){if(this.encoding.includeBom)switch(this.encoding.type){case"Unicode":var e=new ArrayBuffer(2),t=new Uint8Array(e);t[0]=255,t[1]=254,this.bufferBlob=new Blob([e]);break;case"Utf8":var n=new ArrayBuffer(3),r=new Uint8Array(n);r[0]=239,r[1]=187,r[2]=191,this.bufferBlob=new Blob([n]);break;default:this.bufferBlob=new Blob([""])}},e.prototype.save=function(e){""!==this.bufferText&&this.flush(),r.Save.save(e,this.buffer)},e.prototype.write=function(e){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");n.validateNullOrUndefined(e,"string"),this.bufferText+=e,this.bufferText.length>=10240&&this.flush()},e.prototype.flush=function(){if(void 0!==this.bufferText&&null!==this.bufferText&&0!==this.bufferText.length){var e=this.encoding.getBytes(this.bufferText,0,this.bufferText.length);this.bufferText="",this.bufferBlob=new Blob([this.bufferBlob,e])}},e.prototype.writeLine=function(e){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");n.validateNullOrUndefined(e,"string"),this.bufferText=this.bufferText+e+"\r\n",this.bufferText.length>=10240&&this.flush()},e.prototype.destroy=function(){this.bufferBlob=void 0,this.bufferText=void 0,this.enc instanceof n.Encoding&&this.enc.destroy(),this.enc=void 0},e}();t.StreamWriter=o}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t],void 0!==(o=function(e,t){"use strict";function n(e,t){if(null===e||void 0===e)throw new Error("ArgumentException: "+t+" cannot be null or undefined")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(e)}return Object.defineProperty(e.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.encodingType},set:function(e){this.encodingType=e},enumerable:!0,configurable:!0}),e.prototype.initBOM=function(e){this.emitBOM=void 0===e||null===e||e},e.prototype.getByteCount=function(e){if(n(e,"string"),""===e){return this.utf8Len(e.charCodeAt(0))}return null!==this.type&&void 0!==this.type||(this.type="Ansi"),this.getByteCountInternal(e,0,e.length)},e.prototype.utf8Len=function(e){return e<=127?1:e<=2047?2:e<=65535?3:e<=2097151?4:0},e.prototype.isHighSurrogate=function(e){return e>=55296&&e<=56319},e.prototype.toCodepoint=function(e,t){return 65536+((e=(1023&e)<<10)|1023&t)},e.prototype.getByteCountInternal=function(e,t,n){var r=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var o="Utf8"===this.encodingType,i=0;i<n;i++){var f=e.charCodeAt(o?t:t++);if(this.isHighSurrogate(f))if(o){var s=f,u=e.charCodeAt(++t);r+=this.utf8Len(this.toCodepoint(s,u))}else r+=4,++i;else r+=o?this.utf8Len(f):2;o&&t++}return r}return r=n},e.prototype.getBytes=function(e,t,r){if(n(e,"string"),n(t,"charIndex"),n(r,"charCount"),t<0||r<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(e.length-t<r)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===e)return new ArrayBuffer(0);null!==this.type&&void 0!==this.type||(this.type="Ansi");var o=this.getByteCountInternal(e,t,r);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(o,e,t,r);case"Unicode":return this.getBytesOfUnicodeEncoding(o,e,t,r);default:return this.getBytesOfAnsiEncoding(o,e,t,r)}},e.prototype.getString=function(e,t,r){if(n(e,"bytes"),n(t,"index"),n(r,"count"),t<0||r<0)throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");if(e.byteLength-t<r)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===e.byteLength||0===r)return"";null!==this.type&&void 0!==this.type||(this.type="Ansi");var o="",i=new Uint8Array(e);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(i,t,r);case"Unicode":var f=new Uint16Array(e);return o=this.getStringofUnicodeEncoding(f,t,r);default:for(var s=t,u=0;u<r;u++){var a=i[s];o+=String.fromCharCode(a),s++}return o}},e.prototype.getBytesOfAnsiEncoding=function(e,t,n,r){for(var o=new ArrayBuffer(e),i=new Uint8Array(o),f=0,s=0;s<r;s++){var u=t.charCodeAt(n++);i[f]=u<2048?u:63,f++}return o},e.prototype.getBytesOfUtf8Encoding=function(e,t,n,r){for(var o=new ArrayBuffer(e),i=new Uint8Array(o),f=n,s=0,u=0;u<r;u++){var a=t.charCodeAt(f);a<=127?i[s]=a:a<2048?(i[s]=192|a>>6,i[++s]=128|63&a):a<55296||a>=57344?(i[s]=224|a>>12,i[++s]=128|a>>6&63,i[++s]=128|63&a):(i[s]=239,i[++s]=191,i[++s]=189),++s,++f}return o},e.prototype.getBytesOfUnicodeEncoding=function(e,t,n,r){for(var o=new ArrayBuffer(e),i=new Uint16Array(o),f=0;f<r;f++){var s=t.charCodeAt(f);i[f]=s}return o},e.prototype.getStringOfUtf8Encoding=function(e,t,n){var r=0,o=t,i="";for(r;r<n;r++){for(var f=e[o++];o>e.length;)return i;f>127&&(f>191&&f<224&&o<n?f=(31&f)<<6|63&e[o]:f>223&&f<240&&o<e.byteLength?f=(15&f)<<12|(63&e[o])<<6|63&e[++o]:f>239&&f<248&&o<e.byteLength&&(f=(7&f)<<18|(63&e[o])<<12|(63&e[++o])<<6|63&e[++o]),++o),i+=String.fromCharCode(f)}return i},e.prototype.getStringofUnicodeEncoding=function(e,t,n){if(n>e.length)throw new RangeError("ArgumentOutOfRange_Count");for(var r=new Uint16Array(n),o=0;o<n&&o<e.length;o++)r[o]=e[t++];return String.fromCharCode.apply(null,r)},e.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},e}();t.Encoding=r,t.validateNullOrUndefined=n}.apply(t,r))&&(e.exports=o)},function(e,t,n){var r,o;r=[n,t],void 0!==(o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.save=function(e,t){if(null===e||void 0===e||""===e)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var n=e.substring(e.lastIndexOf(".")+1,e.length),r=this.getMimeType(n);if(""!==r&&(t=new Blob([t],{type:r})),this.isMicrosoftBrowser)navigator.msSaveBlob(t,e);else{var o=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(e,n,t,o,"download"in o)}},e.saveInternal=function(e,t,n,r,o){if(o){r.download=e;var i=window.URL.createObjectURL(n);r.href=i;var f=document.createEvent("MouseEvent");f.initEvent("click",!0,!0),r.dispatchEvent(f),setTimeout(function(){window.URL.revokeObjectURL(i),i=void 0})}else if("docx"!==t&&"xlsx"!==t){var s=window.URL.createObjectURL(n),u=window.open(s,"_blank");u||(window.location.href=s)}else{var a=new FileReader;a.onloadend=function(){window.open(a.result,"_blank")||(window.location.href=a.result)},a.readAsDataURL(n)}},e.getMimeType=function(e){var t="";switch(e){case"html":t="text/html";break;case"pdf":t="application/pdf";break;case"docx":t="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"xlsx":t="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"txt":t="text/plain"}return t},e}();t.Save=n}.apply(t,r))&&(e.exports=o)}])});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ej={})}(this,function(e){"use strict";function t(e,t){if(null===e||void 0===e)throw new Error("ArgumentException: "+t+" cannot be null or undefined")}var n=function(){function e(e){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(e)}return Object.defineProperty(e.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.encodingType},set:function(e){this.encodingType=e},enumerable:!0,configurable:!0}),e.prototype.initBOM=function(e){this.emitBOM=void 0===e||null===e||e},e.prototype.getByteCount=function(e){if(t(e,"string"),""===e){return this.utf8Len(e.charCodeAt(0))}return null!==this.type&&void 0!==this.type||(this.type="Ansi"),this.getByteCountInternal(e,0,e.length)},e.prototype.utf8Len=function(e){return e<=127?1:e<=2047?2:e<=65535?3:e<=2097151?4:0},e.prototype.isHighSurrogate=function(e){return e>=55296&&e<=56319},e.prototype.toCodepoint=function(e,t){return((e=(1023&e)<<10)|1023&t)+65536},e.prototype.getByteCountInternal=function(e,t,n){var r=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var i="Utf8"===this.encodingType,o=0;o<n;o++){var f=e.charCodeAt(i?t:t++);if(this.isHighSurrogate(f))if(i){var s=f,u=e.charCodeAt(++t);r+=this.utf8Len(this.toCodepoint(s,u))}else r+=4,++o;else r+=i?this.utf8Len(f):2;i&&t++}return r}return r=n},e.prototype.getBytes=function(e,n,r){if(t(e,"string"),t(n,"charIndex"),t(r,"charCount"),n<0||r<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(e.length-n<r)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===e)return new ArrayBuffer(0);null!==this.type&&void 0!==this.type||(this.type="Ansi");var i=this.getByteCountInternal(e,n,r);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(i,e,n,r);case"Unicode":return this.getBytesOfUnicodeEncoding(i,e,n,r);default:return this.getBytesOfAnsiEncoding(i,e,n,r)}},e.prototype.getString=function(e,n,r){if(t(e,"bytes"),t(n,"index"),t(r,"count"),n<0||r<0)throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");if(e.byteLength-n<r)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===e.byteLength||0===r)return"";null!==this.type&&void 0!==this.type||(this.type="Ansi");var i="",o=new Uint8Array(e);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(o,n,r);case"Unicode":var f=new Uint16Array(e);return i=this.getStringofUnicodeEncoding(f,n,r);default:for(var s=n,u=0;u<r;u++){var c=o[s];i+=String.fromCharCode(c),s++}return i}},e.prototype.getBytesOfAnsiEncoding=function(e,t,n,r){for(var i=new ArrayBuffer(e),o=new Uint8Array(i),f=0,s=0;s<r;s++){var u=t.charCodeAt(n++);o[f]=u<2048?u:63,f++}return i},e.prototype.getBytesOfUtf8Encoding=function(e,t,n,r){for(var i=new ArrayBuffer(e),o=new Uint8Array(i),f=n,s=0,u=0;u<r;u++){var c=t.charCodeAt(f);c<=127?o[s]=c:c<2048?(o[s]=192|c>>6,o[++s]=128|63&c):c<55296||c>=57344?(o[s]=224|c>>12,o[++s]=128|c>>6&63,o[++s]=128|63&c):(o[s]=239,o[++s]=191,o[++s]=189),++s,++f}return i},e.prototype.getBytesOfUnicodeEncoding=function(e,t,n,r){for(var i=new ArrayBuffer(e),o=new Uint16Array(i),f=0;f<r;f++){var s=t.charCodeAt(f);o[f]=s}return i},e.prototype.getStringOfUtf8Encoding=function(e,t,n){for(var r=0,i=t,o="";r<n;r++){for(var f=e[i++];i>e.length;)return o;f>127&&(f>191&&f<224&&i<n?f=(31&f)<<6|63&e[i]:f>223&&f<240&&i<e.byteLength?f=(15&f)<<12|(63&e[i])<<6|63&e[++i]:f>239&&f<248&&i<e.byteLength&&(f=(7&f)<<18|(63&e[i])<<12|(63&e[++i])<<6|63&e[++i]),++i),o+=String.fromCharCode(f)}return o},e.prototype.getStringofUnicodeEncoding=function(e,t,n){if(n>e.length)throw new RangeError("ArgumentOutOfRange_Count");for(var r=new Uint16Array(n),i=0;i<n&&i<e.length;i++)r[i]=e[t++];return String.fromCharCode.apply(null,r)},e.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},e}(),r=function(){function e(){}return e.save=function(e,t){if(null===e||void 0===e||""===e)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var n=e.substring(e.lastIndexOf(".")+1,e.length),r=this.getMimeType(n);if(""!==r&&(t=new Blob([t],{type:r})),this.isMicrosoftBrowser)navigator.msSaveBlob(t,e);else{var i=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(e,n,t,i,"download"in i)}},e.saveInternal=function(e,t,n,r,i){if(i){r.download=e;var o=window.URL.createObjectURL(n);r.href=o;var f=document.createEvent("MouseEvent");f.initEvent("click",!0,!0),r.dispatchEvent(f),setTimeout(function(){window.URL.revokeObjectURL(o),o=void 0})}else if("docx"!==t&&"xlsx"!==t){var s=window.URL.createObjectURL(n);window.open(s,"_blank")||(window.location.href=s)}else{var u=new FileReader;u.onloadend=function(){window.open(u.result,"_blank")||(window.location.href=u.result)},u.readAsDataURL(n)}},e.getMimeType=function(e){var t="";switch(e){case"html":t="text/html";break;case"pdf":t="application/pdf";break;case"docx":t="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"xlsx":t="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"txt":t="text/plain"}return t},e}(),i=function(){function e(e){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(e),r.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(e.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"encoding",{get:function(){return this.enc},enumerable:!0,configurable:!0}),e.prototype.init=function(e){null===e||void 0===e?(this.enc=new n(!1),this.enc.type="Utf8"):(this.enc=e,this.setBomByte())},e.prototype.setBomByte=function(){if(this.encoding.includeBom)switch(this.encoding.type){case"Unicode":var e=new ArrayBuffer(2),t=new Uint8Array(e);t[0]=255,t[1]=254,this.bufferBlob=new Blob([e]);break;case"Utf8":var n=new ArrayBuffer(3),r=new Uint8Array(n);r[0]=239,r[1]=187,r[2]=191,this.bufferBlob=new Blob([n]);break;default:this.bufferBlob=new Blob([""])}},e.prototype.save=function(e){""!==this.bufferText&&this.flush(),r.save(e,this.buffer)},e.prototype.write=function(e){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");t(e,"string"),this.bufferText+=e,this.bufferText.length>=10240&&this.flush()},e.prototype.flush=function(){if(void 0!==this.bufferText&&null!==this.bufferText&&0!==this.bufferText.length){var e=this.encoding.getBytes(this.bufferText,0,this.bufferText.length);this.bufferText="",this.bufferBlob=new Blob([this.bufferBlob,e])}},e.prototype.writeLine=function(e){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");t(e,"string"),this.bufferText=this.bufferText+e+"\r\n",this.bufferText.length>=10240&&this.flush()},e.prototype.destroy=function(){this.bufferBlob=void 0,this.bufferText=void 0,this.enc instanceof n&&this.enc.destroy(),this.enc=void 0},e}();e.StreamWriter=i,e.Encoding=n,e.validateNullOrUndefined=t,e.Save=r,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-file-utils.umd.min.js.map
{
"name": "@syncfusion/ej2-file-utils",
"version": "15.4.22",
"version": "15.4.23",
"description": "Essential JS 2 File Library",
"author": "Syncfusion Inc.",
"license": "UNLICENSED",
"module": "dist/es6/index.js",
"devDependencies": {

@@ -16,2 +15,5 @@ "typescript": "^2.1.1",

},
"main": "./dist/ej2-file-utils.umd.min.js",
"module": "./dist/es6/ej2-file-utils.es5.js",
"es2015": "./dist/es6/ej2-file-utils.es2015.js",
"dependencies": {},

@@ -18,0 +20,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

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