PageSourceSearch

https://mycommutesolutions.com/js/libs/ng-csv-16-07-2014.min.js

js mycommutesolutions.com collected 2026-10-08 12:47:17 UTC 2,846 bytes, 2 lines download raw bytes

1/*! ngcsv 16-07-2014 */
2!function(a){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(a){angular.isDefined(a.urlSanitizationWhitelist)?a.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),angular.module("ngCsv.services").service("CSV",["$q",function(b){var c=encodeURIComponent("\r\n"),d="data:text/csv;charset=utf-8,";this.stringifyField=function(a,b,c){return"string"==typeof a?(a=a.replace(/"/g,'""'),(c||a.indexOf(",")>-1||a.indexOf("\n")>-1||a.indexOf("\r")>-1)&&(a=b+a+b),encodeURIComponent(a)):"boolean"==typeof a?a?"TRUE":"FALSE":a},this.stringify=function(e,f){var g,h=b.defer(),i=this,j="",k=b.when(e).then(function(b){if(b=angular.copy(b),angular.isDefined(f.header)&&f.header){var e,k;e=[],angular.forEach(f.header,function(a){this.push(i.stringifyField(a,f.txtDelim,f.quoteStrings))},e),k=e.join(f.fieldSep?f.fieldSep:","),j+=k+c}var l;l=angular.isArray(b)?b:b(),angular.forEach(l,function(a,b){var d,e;e=[],angular.forEach(a,function(a){this.push(i.stringifyField(a,f.txtDelim,f.quoteStrings))},e),d=e.join(f.fieldSep?f.fieldSep:","),j+=b<l.length?d+c:d}),g=a.navigator.msSaveOrOpenBlob?j:d+j,h.resolve(g)});return"function"==typeof k.catch&&k.catch(function(a){h.reject(a)}),h.promise}}]),angular.module("ngCsv.directives").directive("ngCsv",["$parse","$q","CSV","$document","$timeout",function(b,c,d,e,f){return{restrict:"AC",scope:{data:"&ngCsv",filename:"@filename",header:"&csvHeader",txtDelim:"@textDelimiter",quoteStrings:"@quoteStrings",fieldSep:"@fieldSeparator",lazyLoad:"@lazyLoad",ngClick:"&"},controller:["$scope","$element","$attrs","$transclude",function(a,b,e){function f(){var b={txtDelim:a.txtDelim?a.txtDelim:'"',quoteStrings:a.quoteStrings};return angular.isDefined(e.csvHeader)&&(b.header=a.$eval(a.header)),b.fieldSep=a.fieldSep?a.fieldSep:",",b}a.csv="",angular.isDefined(a.lazyLoad)&&"true"==a.lazyLoad||angular.isArray(a.data)&&a.$watch("data",function(){a.buildCSV()},!0),a.getFilename=function(){return a.filename||"download.csv"},a.buildCSV=function(){var b=c.defer();return d.stringify(a.data(),f()).then(function(c){a.csv=c,b.resolve(c)}),a.$apply(),b.promise}}],link:function(b,c){function d(){if(a.navigator.msSaveOrOpenBlob){var c=new Blob([b.csv],{type:"text/csv;charset=utf-8;"});navigator.msSaveBlob(c,b.getFilename())}else{var d=angular.element("<a></a>");d.attr("href",b.csv),d.attr("download",b.getFilename()),e.find("body").append(d),f(function(){d[0].click(),d.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.