parse-googlesheets
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -91,3 +91,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
exports.request = typeof fetch === 'function' | ||
? fetch | ||
? fetch.bind(window) | ||
: __webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'node-fetch'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); | ||
@@ -131,2 +131,2 @@ | ||
}); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9wYXJzZS1nb29nbGVzaGVldHMvd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovL3BhcnNlLWdvb2dsZXNoZWV0cy8uL3NyYy9pbmRleC50cyIsIndlYnBhY2s6Ly9wYXJzZS1nb29nbGVzaGVldHMvLi9zcmMvcmVxdWVzdC50cyIsIndlYnBhY2s6Ly9wYXJzZS1nb29nbGVzaGVldHMvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcGFyc2UtZ29vZ2xlc2hlZXRzL3dlYnBhY2svc3RhcnR1cCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxDQUFDO0FBQ0QsTzs7Ozs7Ozs7OztBQ1ZhO0FBQ2IsOENBQTZDLENBQUMsY0FBYyxFQUFDO0FBQzdELHdCQUF3QixHQUFHLHlCQUF5QixHQUFHLGNBQWMsR0FBRyxjQUFjO0FBQ3RGLGdCQUFnQixtQkFBTyxDQUFDLG1DQUFXO0FBQ25DO0FBQ0EsNEJBQTRCO0FBQzVCO0FBQ0Esd0JBQXdCO0FBQ3hCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOEJBQThCLHFCQUFxQixhQUFhLEdBQUc7QUFDbkUsZ0NBQWdDLGFBQWE7QUF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3VyY2VSb290IjoiIn0= |
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(){return(()=>{"use strict";var e={432:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadGoogleSheets=t.parseGoogleSheets=t.number=t.string=void 0;var n=r(602),o=function(e,t,r){return function(n){return e(n)?t(n):r(n)}},u=function(e){return null==e},i=function(e){return function(){return e}};t.string=o(u,i(void 0),(function(e){return e})),t.number=o(u,i(void 0),(function(e){return isNaN(Number(e))?void 0:Number(e)})),t.parseGoogleSheets=function(e,t){var r=t.feed.entry.reduce((function(e,t){var r=Number(t.gs$cell.row),n=Number(t.gs$cell.col);return e[r]||(e[r]=[]),e[r][n]=t.content.$t,e}),[]).filter((function(e){return e.filter((function(e){return!!e}))})),n=r[0],o=Object.entries(e),u=n.reduce((function(e,t,r){var n,u=null!==(n=o.find((function(e){return e[0],e[1].columnName.toLowerCase()===t.trim().toLowerCase()})))&&void 0!==n?n:[void 0,{type:void 0}],i=u[0],c=u[1].parse;return i&&c&&(e[i]={index:r,parse:c}),e}),Object.create(null));return r.slice(1).map((function(e){return Object.entries(u).reduce((function(t,r){var n=r[0],o=r[1],u=o.index,i=o.parse;return t[n]=i(e[u]),t}),Object.create(null))}))},t.loadGoogleSheets=function(e,r,o){return void 0===o&&(o=1),n.request("https://spreadsheets.google.com/feeds/cells/"+r+"/"+o+"/public/full?alt=json").then((function(e){return e.ok?e.json():e.text().then((function(e){return Promise.reject(e)}))})).then((function(r){return t.parseGoogleSheets(e,r)}))}},602:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0,t.request="function"==typeof fetch?fetch:r(Object(function(){var e=new Error("Cannot find module 'node-fetch'");throw e.code="MODULE_NOT_FOUND",e}()))}},t={};return function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(432)})()})); | ||
!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(()=>{"use strict";var e={432:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadGoogleSheets=t.parseGoogleSheets=t.number=t.string=void 0;var r=n(602),o=function(e,t,n){return function(r){return e(r)?t(r):n(r)}},u=function(e){return null==e},i=function(e){return function(){return e}};t.string=o(u,i(void 0),(function(e){return e})),t.number=o(u,i(void 0),(function(e){return isNaN(Number(e))?void 0:Number(e)})),t.parseGoogleSheets=function(e,t){var n=t.feed.entry.reduce((function(e,t){var n=Number(t.gs$cell.row),r=Number(t.gs$cell.col);return e[n]||(e[n]=[]),e[n][r]=t.content.$t,e}),[]).filter((function(e){return e.filter((function(e){return!!e}))})),r=n[0],o=Object.entries(e),u=r.reduce((function(e,t,n){var r,u=null!==(r=o.find((function(e){return e[0],e[1].columnName.toLowerCase()===t.trim().toLowerCase()})))&&void 0!==r?r:[void 0,{type:void 0}],i=u[0],c=u[1].parse;return i&&c&&(e[i]={index:n,parse:c}),e}),Object.create(null));return n.slice(1).map((function(e){return Object.entries(u).reduce((function(t,n){var r=n[0],o=n[1],u=o.index,i=o.parse;return t[r]=i(e[u]),t}),Object.create(null))}))},t.loadGoogleSheets=function(e,n,o){return void 0===o&&(o=1),r.request("https://spreadsheets.google.com/feeds/cells/"+n+"/"+o+"/public/full?alt=json").then((function(e){return e.ok?e.json():e.text().then((function(e){return Promise.reject(e)}))})).then((function(n){return t.parseGoogleSheets(e,n)}))}},602:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.request=void 0,t.request="function"==typeof fetch?fetch.bind(window):n(Object(function(){var e=new Error("Cannot find module 'node-fetch'");throw e.code="MODULE_NOT_FOUND",e}()))}},t={};return function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(432)})()})); | ||
//# sourceMappingURL=parse-googlesheets.min.js.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.request = typeof fetch === 'function' | ||
? fetch | ||
? fetch.bind(window) | ||
: require('node-fetch'); |
{ | ||
"name": "parse-googlesheets", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Parse google sheets", | ||
@@ -5,0 +5,0 @@ "main": "dist/parse-googlesheets.min.js", |
export const request: typeof fetch = typeof fetch === 'function' | ||
? fetch | ||
? fetch.bind(window) | ||
: require('node-fetch'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31711