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

twitch-oauth

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-oauth - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

14

lib/utils.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonToURLEncoded = void 0;
const querystring_1 = __importDefault(require("querystring"));
function isomorphicEscape(value) {
if (typeof window === 'undefined') {
return querystring_1.default.escape(value);
}
else {
return encodeURIComponent(value);
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -12,3 +24,3 @@ function jsonToURLEncoded(object) {

}
queries.push(key + '=' + encodeURIComponent(value));
queries.push(key + '=' + isomorphicEscape(value));
}

@@ -15,0 +27,0 @@ return queries.join('&');

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Authenticate users with Twitch.",
"version": "0.1.1",
"version": "0.1.2",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

@@ -0,4 +1,14 @@

import qs from 'querystring';
function isomorphicEscape(value: string) {
if (typeof window === 'undefined') {
return qs.escape(value);
} else {
return encodeURIComponent(value);
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function jsonToURLEncoded(object: Record<string, any>) {
const queries = [];
const queries: string[] = [];
for (const key in object) {

@@ -10,5 +20,5 @@ let value = object[key];

queries.push(key + '=' + encodeURIComponent(value));
queries.push(key + '=' + isomorphicEscape(value));
}
return queries.join('&');
}
}

Sorry, the diff of this file is not supported yet

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