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

apps-script-db

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apps-script-db - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

dist/apps-script-db.cjs.js

@@ -16,3 +16,3 @@ 'use strict';

AppsScriptDB.prototype._stringify = function _stringify (data) {
return Object.keys(data).map(function (k) { return (k + "=" + (data[k])); }).join('&');
return Object.keys(data).map(function (k) { return (k + "=" + (encodeURIComponent(data[k]))); }).join('&');
};

@@ -19,0 +19,0 @@ AppsScriptDB.prototype._GET = function _GET (url, data) {

@@ -14,3 +14,3 @@ var AppsScriptDB = function AppsScriptDB(url, fetch) {

AppsScriptDB.prototype._stringify = function _stringify (data) {
return Object.keys(data).map(function (k) { return (k + "=" + (data[k])); }).join('&');
return Object.keys(data).map(function (k) { return (k + "=" + (encodeURIComponent(data[k]))); }).join('&');
};

@@ -17,0 +17,0 @@ AppsScriptDB.prototype._GET = function _GET (url, data) {

@@ -20,3 +20,3 @@ (function (global, factory) {

AppsScriptDB.prototype._stringify = function _stringify (data) {
return Object.keys(data).map(function (k) { return (k + "=" + (data[k])); }).join('&');
return Object.keys(data).map(function (k) { return (k + "=" + (encodeURIComponent(data[k]))); }).join('&');
};

@@ -23,0 +23,0 @@ AppsScriptDB.prototype._GET = function _GET (url, data) {

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ADB=e()}(this,function(){"use strict";var t=function(t,e){if(void 0===e&&(e=window.fetch.bind(window)),"string"!=typeof t||"function"!=typeof e)throw new TypeError("url should be string,fetch should be whatwg-fetch.");this.url=t,this.fetch=e};return t.prototype.handleResult=function(t){return function(e){if("error"===e)throw new Error("Failed to "+t)}},t.prototype._stringify=function(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")},t.prototype._GET=function(t,e){return this.fetch(t+"?"+this._stringify(e)).then(function(t){return t.text()})},t.prototype._POST=function(t,e){return this.fetch(t,{method:"POST",body:this._stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return t.text()})},t.prototype.get=function(t){if(void 0===t&&(t="*"),"string"!=typeof t)throw new TypeError("key should be string.");return this._GET(this.url,{key:t})},t.prototype.set=function(t,e){if("string"!=typeof t||"string"!=typeof e)throw new TypeError("key,value should be string.");return this._POST(this.url,{key:t,value:e}).then(this.handleResult("set"))},t.prototype.del=function(t){if(void 0===t&&(t="*"),"string"!=typeof t)throw new TypeError("key should be string.");return this._POST(this.url,{del:t}).then(this.handleResult("del"))},t});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ADB=e()}(this,function(){"use strict";var t=function(t,e){if(void 0===e&&(e=window.fetch.bind(window)),"string"!=typeof t||"function"!=typeof e)throw new TypeError("url should be string,fetch should be whatwg-fetch.");this.url=t,this.fetch=e};return t.prototype.handleResult=function(t){return function(e){if("error"===e)throw new Error("Failed to "+t)}},t.prototype._stringify=function(t){return Object.keys(t).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&")},t.prototype._GET=function(t,e){return this.fetch(t+"?"+this._stringify(e)).then(function(t){return t.text()})},t.prototype._POST=function(t,e){return this.fetch(t,{method:"POST",body:this._stringify(e),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){return t.text()})},t.prototype.get=function(t){if(void 0===t&&(t="*"),"string"!=typeof t)throw new TypeError("key should be string.");return this._GET(this.url,{key:t})},t.prototype.set=function(t,e){if("string"!=typeof t||"string"!=typeof e)throw new TypeError("key,value should be string.");return this._POST(this.url,{key:t,value:e}).then(this.handleResult("set"))},t.prototype.del=function(t){if(void 0===t&&(t="*"),"string"!=typeof t)throw new TypeError("key should be string.");return this._POST(this.url,{del:t}).then(this.handleResult("del"))},t});
//# sourceMappingURL=apps-script-db.min.js.map
{
"name": "apps-script-db",
"version": "0.4.3",
"version": "0.4.4",
"main": "dist/apps-script-db.cjs.js",

@@ -5,0 +5,0 @@ "browser": "dist/apps-script-db.min.js",

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