Socket
Socket
Sign inDemoInstall

@glvnzn/web-sdk

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glvnzn/web-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/resources/base.d.ts

13

dist/index.d.ts

@@ -1,7 +0,8 @@

import { Base } from "./base";
import { Posts } from "./posts";
declare class Typicode extends Base {
import { Posts } from './resources/posts';
export declare class Library {
posts: Posts;
constructor(config: {
apiKey: string;
baseUrl?: string;
});
}
interface Typicode extends Posts {
}
export default Typicode;

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

function t(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,e(t,r)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r,o=/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,e){try{var r=""+this.baseUrl+t,o=Object.assign({},e,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return Promise.resolve(fetch(r,o)).then(function(t){var e;function r(r){if(e)return r;throw new Error(t.statusText)}var o=function(){if(t.ok)return Promise.resolve(t.json()).then(function(t){return e=1,t})}();return o&&o.then?o.then(r):r(o)})}catch(t){return Promise.reject(t)}},t}(),n="posts",i=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}t(r,e);var o=r.prototype;return o.getPostById=function(t){try{return Promise.resolve(this.request("/posts/"+t))}catch(t){return Promise.reject(t)}},o.getPosts=function(){try{return Promise.resolve(this.request("/"+n))}catch(t){return Promise.reject(t)}},o.createPost=function(t){try{return Promise.resolve(this.request("/"+n,{method:"POST",body:JSON.stringify(t)}))}catch(t){return Promise.reject(t)}},r}(o),s=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}return t(r,e),r}(o);r=s,[i].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(e){Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e))})}),module.exports=s;
function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=/*#__PURE__*/t(require("isomorphic-unfetch"));function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},r.apply(this,arguments)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var n="posts",i=/*#__PURE__*/function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,o(e,r);var s=i.prototype;return s.getPostById=function(t){return this.request("/posts/"+t)},s.getPosts=function(){return this.request("/"+n)},s.createPost=function(t){return this.request("/"+n,{method:"POST",body:JSON.stringify(t)})},i}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,o){var n=""+this.baseUrl+t,i=r({},o,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return e.default(n,i).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());exports.Library=function(t){this.posts=void 0,this.posts=new i(t)};

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

function t(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,e(t,r)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r,o=/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,e){try{var r=""+this.baseUrl+t,o=Object.assign({},e,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return Promise.resolve(fetch(r,o)).then(function(t){var e;function r(r){if(e)return r;throw new Error(t.statusText)}var o=function(){if(t.ok)return Promise.resolve(t.json()).then(function(t){return e=1,t})}();return o&&o.then?o.then(r):r(o)})}catch(t){return Promise.reject(t)}},t}(),n="posts",i=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}t(r,e);var o=r.prototype;return o.getPostById=function(t){try{return Promise.resolve(this.request("/posts/"+t))}catch(t){return Promise.reject(t)}},o.getPosts=function(){try{return Promise.resolve(this.request("/"+n))}catch(t){return Promise.reject(t)}},o.createPost=function(t){try{return Promise.resolve(this.request("/"+n,{method:"POST",body:JSON.stringify(t)}))}catch(t){return Promise.reject(t)}},r}(o),s=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}return t(r,e),r}(o);r=s,[i].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(e){Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e))})});export{s as default};
import t from"isomorphic-unfetch";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(this,arguments)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var o="posts",n=/*#__PURE__*/function(t){var e,n;function s(){return t.apply(this,arguments)||this}n=t,(e=s).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var i=s.prototype;return i.getPostById=function(t){return this.request("/posts/"+t)},i.getPosts=function(){return this.request("/"+o)},i.createPost=function(t){return this.request("/"+o,{method:"POST",body:JSON.stringify(t)})},s}(/*#__PURE__*/function(){function r(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return r.prototype.request=function(r,o){var n=""+this.baseUrl+r,s=e({},o,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return t(n,s).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},r}()),s=function(t){this.posts=void 0,this.posts=new n(t)};export{s as Library};

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).webSdk=e()}(this,function(){function t(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,e(t,r)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r,o=/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,e){try{var r=""+this.baseUrl+t,o=Object.assign({},e,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return Promise.resolve(fetch(r,o)).then(function(t){var e;function r(r){if(e)return r;throw new Error(t.statusText)}var o=function(){if(t.ok)return Promise.resolve(t.json()).then(function(t){return e=1,t})}();return o&&o.then?o.then(r):r(o)})}catch(t){return Promise.reject(t)}},t}(),n="posts",i=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}t(r,e);var o=r.prototype;return o.getPostById=function(t){try{return Promise.resolve(this.request("/posts/"+t))}catch(t){return Promise.reject(t)}},o.getPosts=function(){try{return Promise.resolve(this.request("/"+n))}catch(t){return Promise.reject(t)}},o.createPost=function(t){try{return Promise.resolve(this.request("/"+n,{method:"POST",body:JSON.stringify(t)}))}catch(t){return Promise.reject(t)}},r}(o),s=/*#__PURE__*/function(e){function r(){return e.apply(this,arguments)||this}return t(r,e),r}(o);return r=s,[i].forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(e){Object.defineProperty(r.prototype,e,Object.getOwnPropertyDescriptor(t.prototype,e))})}),s});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("isomorphic-unfetch")):"function"==typeof define&&define.amd?define(["exports","isomorphic-unfetch"],e):e((t||self).webSdk={},t.isomorphicUnfetch)}(this,function(t,e){function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=/*#__PURE__*/o(e);function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},r.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var s="posts",p=/*#__PURE__*/function(t){var e,o;function n(){return t.apply(this,arguments)||this}o=t,(e=n).prototype=Object.create(o.prototype),e.prototype.constructor=e,i(e,o);var r=n.prototype;return r.getPostById=function(t){return this.request("/posts/"+t)},r.getPosts=function(){return this.request("/"+s)},r.createPost=function(t){return this.request("/"+s,{method:"POST",body:JSON.stringify(t)})},n}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,e){var o=""+this.baseUrl+t,i=r({},e,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return n.default(o,i).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());t.Library=function(t){this.posts=void 0,this.posts=new p(t)}});
{
"name": "@glvnzn/web-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "dist/index.js",

@@ -8,24 +9,21 @@ "module": "dist/index.m.js",

"types": "dist/index.d.ts",
"exports": {
"require": "./dist/index.js",
"default": "./dist/index.modern.js"
},
"scripts": {
"build": "rm -rf dist && microbundle --tsconfig tsconfig.json --no-sourcemap",
"dev": "microbundle --watch --tsconfig tsconfig.json --no-sourcemap"
"build": "rm -rf dist && microbundle --tsconfig tsconfig.json --no-sourcemap"
},
"keywords": [],
"author": "glvnzn",
"license": "MIT",
"dependencies": {
"isomorphic-unfetch": "^4.0.2",
"typescript": "^5.3.3"
},
"author": "",
"license": "ISC",
"devDependencies": {
"microbundle": "^0.15.1"
},
"dependencies": {
"isomorphic-unfetch": "^4.0.2"
},
"exports": {
"require": "./dist/index.js",
"default": "./dist/index.modern.js"
},
"files": [
"dist"
],
"description": ""
"dist"
]
}

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