New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

public-google-sheets-parser

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

public-google-sheets-parser - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

dist/index.js

@@ -14,3 +14,3 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

/* istanbul ignore next */
window.fetch : require('node-fetch');
window.fetch : require('./fetch');

@@ -40,3 +40,3 @@ let PublicGoogleSheetsParser = /*#__PURE__*/function () {

return fetch(url).then(r => r.ok ? r.text() : null).catch(
return fetch(url).then(r => r && r.ok && r.text ? r.text() : null).catch(
/* istanbul ignore next */

@@ -43,0 +43,0 @@ _ => null);

{
"name": "public-google-sheets-parser",
"version": "1.2.0",
"version": "1.2.1",
"description": "Get JSONArray from public google sheets with using only spreadsheetId",

@@ -21,3 +21,4 @@ "scripts": {

"google sheets",
"spreadsheet"
"spreadsheet",
"zero-dependency"
],

@@ -24,0 +25,0 @@ "author": {

@@ -1,2 +0,2 @@

# Public Google sheets parser
# Public Google Sheets Parser

@@ -12,4 +12,5 @@ [![Author](https://img.shields.io/badge/Author-fureweb-blue)](https://github.com/fureweb-com)

It is a simple parser that helps you use public Google sheets document as if they were a database.
It is a simple and **zero dependency** parser that helps you use public Google sheets document as if they were a database.
The document to be used must be a Google Sheets document in the 'public' state and have a header in the first row. (e.g. [Google sheets for example](https://docs.google.com/spreadsheets/d/10WDbAPAY7Xl5DT36VuMheTPTTpqx9x0C5sDCnh4BGps/edit#gid=1839148703))

@@ -110,3 +111,3 @@

```html
<script src="https://cdn.jsdelivr.net/npm/public-google-sheets-parser@1.0.21/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/public-google-sheets-parser@latest"></script>

@@ -117,4 +118,7 @@ <script>

parser.parse(spreadsheetId).then((items) => {
// items should be [{"a":1,"b":2,"c":3},{"a":4,"b":5,"c":6},{"a":7,"b":8,"c":9}]
// items should be [{ a: 1, b: 2, c: 3 },{ a: 4, b: 5, c: 6 },{ a: 7, b: 8, c: 9 }]
})
parser.parse(spreadsheetId, 'Sheet2').then((items) => {
// items should be [{ a: 10, b: 20, c: 30 }, { a: 40, b: 50, c: 60 }, { a: 70, b: 80, c: 90 }]
})
</script>

@@ -121,0 +125,0 @@ ```

const https = require('https')
const isBrowser = typeof require === 'undefined'

@@ -20,5 +19,3 @@ const nodeFetch = async (url) => {

const fetch = isBrowser ? /* istanbul ignore next */ window.fetch : nodeFetch
module.exports = fetch
module.exports.default = fetch
module.exports = nodeFetch
module.exports.default = nodeFetch
const isBrowser = typeof require === 'undefined'
const fetch = require('./fetch')
const fetch = isBrowser ? /* istanbul ignore next */window.fetch : require('./fetch')

@@ -4,0 +4,0 @@ class PublicGoogleSheetsParser {

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