Socket
Socket
Sign inDemoInstall

some-random-cat

Package Overview
Dependencies
213
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.3 to 2.2.4

docs/index.yml

15

build/package.json
{
"name": "some-random-cat",
"version": "2.2.1",
"version": "2.2.3",
"description": "A very suitable API to generate random images of cats, dogs and random jokes, facts... A lot more!",
"main": "dist/index.js",
"types": "dist",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"build": "tsc"
"build": "tsc",
"docs": "docgen --jsdoc jsdoc.json --source src/*.ts src/**/*.ts --custom docs/index.yml --output docs/docs.json"
},

@@ -25,5 +26,11 @@ "repository": {

"dependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@types/node": "^14.14.37",
"axios": "^0.21.0",
"discord.js-docgen": "discordjs/docgen#ts-patch",
"dotenv": "^8.2.0",
"jsdoc-babel": "^0.5.0",
"moment": "^2.29.1",

@@ -30,0 +37,0 @@ "moment-duration-format": "^2.3.2"

export interface generateIdProps {
putDash?: boolean;
}
/**
* Manages all the generation methods and allow you to gen stuff.
* @static
*/
export declare class Generation {
/**
*
* @param {generateIdProps} ops The options for generating a secure ID.
* @param {boolean} [ops.putDash] Whether the ID should contain a "-"
* @returns {string}
* ⚠ Please do not instantiate this class.
*/
constructor();
/**
* Generate a secure UUID.
* @param {generateIdProps} ops The options to generate ID.
* @type {string}
*/
static generateId(ops: generateIdProps): string;
/**
* Returns acronym
* @param {string} name Name to parse acronym
* @returns {string}
* Generate an acronym.
* @param {string} name The options to generate ID.
* @type {string}
*/
static getAcronym(name: string): string;
/**
* Shorten text.
* @param {string} text Text to shorten
* @param {number} length Max Length
* @returns {string}
* Shortens some text and substrings it with a ... at the end.
* @param {string} text Text to perform operation on.
* @param {length} number The max length of the string.
* @type {string}
*/

@@ -24,0 +31,0 @@ shorten(text: string, length: number): string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Generation = void 0;
var Generation = /** @class */ (function () {
function Generation() {
}
/**
* Manages all the generation methods and allow you to gen stuff.
* @static
*/
class Generation {
/**
*
* @param {generateIdProps} ops The options for generating a secure ID.
* @param {boolean} [ops.putDash] Whether the ID should contain a "-"
* @returns {string}
* ⚠ Please do not instantiate this class.
*/
Generation.generateId = function (ops) {
constructor() { }
/**
* Generate a secure UUID.
* @param {generateIdProps} ops The options to generate ID.
* @type {string}
*/
static generateId(ops) {
var dt = new Date().getTime();

@@ -30,9 +35,9 @@ if (ops.putDash === false) {

return uuid;
};
}
/**
* Returns acronym
* @param {string} name Name to parse acronym
* @returns {string}
* Generate an acronym.
* @param {string} name The options to generate ID.
* @type {string}
*/
Generation.getAcronym = function (name) {
static getAcronym(name) {
if (!name || typeof name !== "string")

@@ -42,12 +47,12 @@ return "";

.replace(/'s /g, " ")
.replace(/\w+/g, function (e) { return e[0]; })
.replace(/\w+/g, (e) => e[0])
.replace(/\s/g, "");
};
}
/**
* Shorten text.
* @param {string} text Text to shorten
* @param {number} length Max Length
* @returns {string}
* Shortens some text and substrings it with a ... at the end.
* @param {string} text Text to perform operation on.
* @param {length} number The max length of the string.
* @type {string}
*/
Generation.prototype.shorten = function (text, length) {
shorten(text, length) {
if (typeof text !== "string")

@@ -58,5 +63,4 @@ return "";

return text.substr(0, length).trim() + "...";
};
return Generation;
}());
}
}
exports.Generation = Generation;

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

export interface Advice {
id: number;
advice: string;
}
export interface Cat {
breeds: Array<any>;
id: string;
url: string;
width: number;
weight: number;
}
export interface Joke {
title: string;
body: string;
url: string;
}
export interface Meme {
endpoint: string;
img: string;
title: string;
upvotes: number;
downvotes: number;
upvoteRatio: number;
author: string;
comments: number;
text: string;
post: string;
}
/**
* Manages all the random methods and is the main module.
* @static
*/
export declare class Random {

@@ -7,31 +39,36 @@ /**

/**
*
* @returns {Promise<string | void>}
* Get a random advice.
* @type {Advice}
*/
static getAdvice(): Promise<string | void>;
static getCat(): Promise<any>;
static getAdvice(): Promise<Advice | void>;
/**
* @returns {Promise<string | void>} Returns a URL of the picture.
* Get a random cat.
* @type {Cat}
*/
static getCat(): Promise<Cat>;
/**
* Get a random dog.
* @type {string}
*/
static getDog(): Promise<string | void>;
/**
* @returns {Promise<string | void>} Returns a string with the fact.
* Get a random fact.
* @type {string}
*/
static getFact(): Promise<string | void>;
/**
*
* @returns {Promise<string | void>} Returns an object with a promise.
* Get a random joke.
* @type {Joke}
*/
static getJoke(): Promise<string | void>;
static getJoke(): Promise<Joke | void>;
/**
*
* Get a random meme.
* @type {object}
* @param {string} sub The subreddit's name.
* @returns {Promise<object | void>} Returns an object with a promise.
*/
static getMeme(sub: string): Promise<object | void>;
static getMeme(sub: string): Promise<Meme | void>;
/**
* @param {string} pokemon The name of the pokemon.
* @returns {Promise<string | void>} Returns a string.
*/
static getPokemon(pokemon: string): Promise<string | void>;
/**
* Get a string.
* @param {number} number The length of the string

@@ -42,2 +79,3 @@ * @returns {Promise<string | void>} Returns a string.

/**
* Get a topic.
* @returns {Promise<string | void>} Returns a string with the topic.

@@ -44,0 +82,0 @@ */

@@ -21,260 +21,119 @@ "use strict";

};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Random = void 0;
var axios = __importStar(require("axios"));
var dotenv = __importStar(require("dotenv"));
var defaultAxios = axios.default;
const axios = __importStar(require("axios"));
const dotenv = __importStar(require("dotenv"));
const defaultAxios = axios.default;
dotenv.config();
var Random = /** @class */ (function () {
/**
* Manages all the random methods and is the main module.
* @static
*/
class Random {
/**
* ⚠ Please do not instantiate this class.
*/
function Random() {
constructor() { }
/**
* Get a random advice.
* @type {Advice}
*/
static async getAdvice() {
const main = await defaultAxios.get("https://api.adviceslip.com/advice");
const res = await main.data;
if (!res) {
throw new Error("SomeRandomCat > Unable to access the json content of API");
}
let content = res.slip;
return content;
}
/**
*
* @returns {Promise<string | void>}
* Get a random cat.
* @type {Cat}
*/
Random.getAdvice = function () {
return __awaiter(this, void 0, void 0, function () {
var main, res, content;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://api.adviceslip.com/advice")];
case 1:
main = _a.sent();
return [4 /*yield*/, main.data];
case 2:
res = _a.sent();
if (!res) {
throw new Error("SomeRandomCat > Unable to access the json content of API");
}
content = res.slip.advice;
return [2 /*return*/, content];
}
});
});
};
Random.getCat = function () {
return __awaiter(this, void 0, void 0, function () {
var res, data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://api.thecatapi.com/v1/images/search?format=json")];
case 1:
res = _a.sent();
if (!res) {
throw new Error("SomeRandomCat > Error fetching a random image from API.");
}
data = res.data[0].url;
return [2 /*return*/, data];
}
});
});
};
static async getCat() {
const res = await defaultAxios.get("https://api.thecatapi.com/v1/images/search?format=json");
if (!res) {
throw new Error("SomeRandomCat > Error fetching a random image from API.");
}
let data = res.data[0];
return data;
}
/**
* @returns {Promise<string | void>} Returns a URL of the picture.
* Get a random dog.
* @type {string}
*/
Random.getDog = function () {
return __awaiter(this, void 0, void 0, function () {
var res, data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://dog.ceo/api/breeds/image/random")];
case 1:
res = _a.sent();
if (!res)
throw new Error("SomeRandomCat > Error fetching a random image from API.");
data = res.data.message;
return [2 /*return*/, data];
}
});
});
};
static async getDog() {
const res = await defaultAxios.get("https://dog.ceo/api/breeds/image/random");
if (!res)
throw new Error("SomeRandomCat > Error fetching a random image from API.");
let data = res.data.message;
return data;
}
/**
* @returns {Promise<string | void>} Returns a string with the fact.
* Get a random fact.
* @type {string}
*/
Random.getFact = function () {
return __awaiter(this, void 0, void 0, function () {
var main, content;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://bruhapi.xyz/fact")];
case 1:
main = _a.sent();
content = main.data.res;
return [2 /*return*/, content];
}
});
});
};
static async getFact() {
const main = await defaultAxios.get("https://bruhapi.syntaxpwn.repl.co/fact");
let content = main.data.res;
return content;
}
/**
*
* @returns {Promise<string | void>} Returns an object with a promise.
* Get a random joke.
* @type {Joke}
*/
Random.getJoke = function () {
return __awaiter(this, void 0, void 0, function () {
var res;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://apis.duncte123.me/joke")];
case 1:
res = _a.sent();
if (!res)
throw new Error("SomeRandomCat > Error fetching a random joke from API.");
else
return [2 /*return*/, res.data.data];
return [2 /*return*/];
}
});
});
};
static async getJoke() {
// https://apis.duncte123.me/joke
const res = await defaultAxios.get("https://apis.duncte123.me/joke");
if (!res)
throw new Error("SomeRandomCat > Error fetching a random joke from API.");
return res.data.data;
}
/**
*
* Get a random meme.
* @type {object}
* @param {string} sub The subreddit's name.
* @returns {Promise<object | void>} Returns an object with a promise.
*/
Random.getMeme = function (sub) {
return __awaiter(this, void 0, void 0, function () {
var start, response, responseTime, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
start = Date.now();
return [4 /*yield*/, defaultAxios.get("https://imageapi.fionn.live/reddit/" + sub.toLowerCase())];
case 1:
response = _a.sent();
responseTime = Date.now() - start;
return [2 /*return*/, {
img: response.data.img,
res: responseTime,
title: response.data.title,
upvotes: response.data.upvotes,
author: response.data.author,
upvoteRatio: response.data.upvoteRatio,
comments: response.data.comments,
downvotes: response.data.downvotes,
}];
case 2:
error_1 = _a.sent();
throw new Error("SomeRandomCat > There was an error trying to generate a meme.\n> " +
error_1);
case 3: return [2 /*return*/];
}
});
});
};
static async getMeme(sub) {
try {
const response = await defaultAxios.get(`https://imageapi.fionn.live/reddit/${sub.toLowerCase()}`);
return response.data;
}
catch (error) {
throw new Error("SomeRandomCat > There was an error trying to generate a meme.\n> " +
error);
}
}
/**
* @param {string} pokemon The name of the pokemon.
* @returns {Promise<string | void>} Returns a string.
*/
Random.getPokemon = function (pokemon) {
return __awaiter(this, void 0, void 0, function () {
var res;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (typeof pokemon !== "string") {
throw new TypeError("SomeRandomCat > Please provide a pokemon name.");
}
return [4 /*yield*/, defaultAxios
.get("https://api.snowflakedev.xyz/api/pokemon?name=" + pokemon, {
headers: {
Authorization: process.env.SNOWFLAKE_API_TOKEN,
},
})
.catch(function () {
throw new Error("SomeRandomCat > Invalid Pokemon name provided.");
})];
case 1:
res = _a.sent();
return [2 /*return*/, res.data];
}
});
});
};
/**
* Get a string.
* @param {number} number The length of the string
* @returns {Promise<string | void>} Returns a string.
*/
Random.getString = function (number) {
return __awaiter(this, void 0, void 0, function () {
var res;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, defaultAxios.get("https://apis.duncte123.me/random-string/" + number)];
case 1:
res = _a.sent();
if (!number)
throw new TypeError("SomeRandomCat > No number specified. Please specify a number!");
if (!res)
throw new Error("SomeRandomCat > Error fetching a random string from API.");
else
return [2 /*return*/, res.data.data];
return [2 /*return*/];
}
});
});
};
static async getString(number) {
const res = await defaultAxios.get(`https://apis.duncte123.me/random-string/${number}`);
if (!number)
throw new TypeError("SomeRandomCat > No number specified. Please specify a number!");
if (!res)
throw new Error("SomeRandomCat > Error fetching a random string from API.");
else
return res.data.data;
}
/**
* Get a topic.
* @returns {Promise<string | void>} Returns a string with the topic.
*/
Random.getTopic = function () {
return __awaiter(this, void 0, void 0, function () {
var main, content, error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, defaultAxios.get("http://bruhapi.xyz/topic")];
case 1:
main = _a.sent();
content = main.data.res;
return [2 /*return*/, content];
case 2:
error_2 = _a.sent();
throw new Error("SomeRandomCat > Error while fetching a random topic.\n> " + error_2);
case 3: return [2 /*return*/];
}
});
});
};
return Random;
}());
static async getTopic() {
try {
const main = await defaultAxios.get("http://bruhapi.xyz/topic");
let content = main.data.res;
return content;
}
catch (error) {
throw new Error("SomeRandomCat > Error while fetching a random topic.\n> " + error);
}
}
}
exports.Random = Random;

@@ -1,6 +0,13 @@

export declare class Util {
/**
* A utility class.
* @static
*/
export default class Util {
/**
* ⚠ Please do not instantiate this class.
*/
constructor();
/**
*
* @returns {object}
* Gets some information on the package.
* @type {object}
*/

@@ -7,0 +14,0 @@ static getInfo(): object;

@@ -22,12 +22,17 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Util = void 0;
var config = __importStar(require("../../package.json"));
var Util = /** @class */ (function () {
function Util() {
}
const config = __importStar(require("../../package.json"));
/**
* A utility class.
* @static
*/
class Util {
/**
*
* @returns {object}
* ⚠ Please do not instantiate this class.
*/
Util.getInfo = function () {
constructor() { }
/**
* Gets some information on the package.
* @type {object}
*/
static getInfo() {
return {

@@ -39,5 +44,4 @@ version: config.version,

};
};
return Util;
}());
exports.Util = Util;
}
}
exports.default = Util;
{
"name": "some-random-cat",
"version": "2.2.3",
"version": "2.2.4",
"description": "A very suitable API to generate random images of cats, dogs and random jokes, facts... A lot more!",

@@ -8,3 +8,4 @@ "main": "build/src/index.js",

"scripts": {
"build": "tsc"
"build": "tsc",
"docs": "docgen --jsdoc jsdoc.json --source src/*.ts src/**/*.ts --custom docs/index.yml --output docs/docs.json"
},

@@ -26,6 +27,11 @@ "repository": {

"dependencies": {
"@discordjs/docgen": "^0.10.0",
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@types/node": "^14.14.37",
"axios": "^0.21.0",
"discord.js-docgen": "discordjs/docgen#ts-patch",
"dotenv": "^8.2.0",
"jsdoc-babel": "^0.5.0",
"moment": "^2.29.1",

@@ -32,0 +38,0 @@ "moment-duration-format": "^2.3.2"

@@ -32,3 +32,3 @@ # Introduction

```javascript
const SomeRandomCat = require('../index').Random; // Replace ../index with some-random-cat
const SomeRandomCat = require('some-random-cat').Random;
SomeRandomCat.getCat() // Function for generating cat

@@ -35,0 +35,0 @@ .then(res => {

@@ -5,9 +5,18 @@ export interface generateIdProps {

/**
* Manages all the generation methods and allow you to gen stuff.
* @static
*/
export class Generation {
/**
*
* @param {generateIdProps} ops The options for generating a secure ID.
* @param {boolean} [ops.putDash] Whether the ID should contain a "-"
* @returns {string}
* ⚠ Please do not instantiate this class.
*/
constructor() {}
/**
* Generate a secure UUID.
* @param {generateIdProps} ops The options to generate ID.
* @type {string}
*/
public static generateId(ops: generateIdProps): string {

@@ -38,5 +47,5 @@ var dt = new Date().getTime();

/**
* Returns acronym
* @param {string} name Name to parse acronym
* @returns {string}
* Generate an acronym.
* @param {string} name The options to generate ID.
* @type {string}
*/

@@ -52,6 +61,6 @@ public static getAcronym(name: string): string {

/**
* Shorten text.
* @param {string} text Text to shorten
* @param {number} length Max Length
* @returns {string}
* Shortens some text and substrings it with a ... at the end.
* @param {string} text Text to perform operation on.
* @param {length} number The max length of the string.
* @type {string}
*/

@@ -58,0 +67,0 @@ public shorten(text: string, length: number): string {

import * as axios from "axios";
import * as dotenv from "dotenv";
import path from "path";
const defaultAxios = axios.default;
dotenv.config();
dotenv.config()
export interface Advice {
id: number;
advice: string;
}
export interface Cat {
breeds: Array<any>;
id: string;
url: string;
width: number;
weight: number
}
export interface Joke {
title: string;
body: string;
url: string;
}
export interface Meme {
endpoint: string;
img: string;
title: string;
upvotes: number;
downvotes: number;
upvoteRatio: number;
author: string;
comments: number;
text: string;
post: string;
}
/**
* Manages all the random methods and is the main module.
* @static
*/
export class Random {

@@ -14,7 +51,7 @@ /**

/**
*
* @returns {Promise<string | void>}
* Get a random advice.
* @type {Advice}
*/
public static async getAdvice(): Promise<string | void> {
public static async getAdvice(): Promise<Advice | void> {
const main = await defaultAxios.get("https://api.adviceslip.com/advice");

@@ -29,7 +66,12 @@ const res = await main.data;

let content = res.slip.advice;
let content: Advice = res.slip;
return content;
}
public static async getCat() {
/**
* Get a random cat.
* @type {Cat}
*/
public static async getCat(): Promise<Cat> {
const res = await defaultAxios.get(

@@ -45,3 +87,3 @@ "https://api.thecatapi.com/v1/images/search?format=json"

let data = res.data[0].url;
let data = res.data[0];
return data;

@@ -51,3 +93,4 @@ }

/**
* @returns {Promise<string | void>} Returns a URL of the picture.
* Get a random dog.
* @type {string}
*/

@@ -67,7 +110,8 @@ public static async getDog(): Promise<string | void> {

/**
* @returns {Promise<string | void>} Returns a string with the fact.
* Get a random fact.
* @type {string}
*/
public static async getFact(): Promise<string | void> {
const main = await defaultAxios.get("https://bruhapi.xyz/fact");
const main = await defaultAxios.get("https://bruhapi.syntaxpwn.repl.co/fact");
let content = main.data.res;

@@ -78,6 +122,6 @@ return content;

/**
*
* @returns {Promise<string | void>} Returns an object with a promise.
* Get a random joke.
* @type {Joke}
*/
public static async getJoke(): Promise<string | void> {
public static async getJoke(): Promise<Joke | void> {
// https://apis.duncte123.me/joke

@@ -87,6 +131,10 @@ const res = await defaultAxios.get("https://apis.duncte123.me/joke");

throw new Error("SomeRandomCat > Error fetching a random joke from API.");
else return res.data.data;
return res.data.data;
}
/**
*
* Get a random meme.
* @type {object}
* @param {string} sub The subreddit's name.

@@ -96,20 +144,9 @@ * @returns {Promise<object | void>} Returns an object with a promise.

public static async getMeme(sub: string): Promise<object | void> {
public static async getMeme(sub: string): Promise<Meme | void> {
try {
const start = Date.now();
const response = await defaultAxios.get(
`https://imageapi.fionn.live/reddit/${sub.toLowerCase()}`
);
const responseTime = Date.now() - start;
return {
img: response.data.img,
res: responseTime,
title: response.data.title,
upvotes: response.data.upvotes,
author: response.data.author,
upvoteRatio: response.data.upvoteRatio,
comments: response.data.comments,
downvotes: response.data.downvotes,
};
return response.data;
} catch (error) {

@@ -124,22 +161,3 @@ throw new Error(

/**
* @param {string} pokemon The name of the pokemon.
* @returns {Promise<string | void>} Returns a string.
*/
public static async getPokemon(pokemon: string): Promise<string | void> {
if (typeof pokemon !== "string") {
throw new TypeError("SomeRandomCat > Please provide a pokemon name.");
}
const res = await defaultAxios
.get("https://api.snowflakedev.xyz/api/pokemon?name=" + pokemon, {
headers: {
Authorization: process.env.SNOWFLAKE_API_TOKEN,
},
})
.catch(() => {
throw new Error("SomeRandomCat > Invalid Pokemon name provided.");
});
return res.data;
}
/**
* Get a string.
* @param {number} number The length of the string

@@ -164,2 +182,3 @@ * @returns {Promise<string | void>} Returns a string.

/**
* Get a topic.
* @returns {Promise<string | void>} Returns a string with the topic.

@@ -166,0 +185,0 @@ */

import * as config from "../../package.json";
export class Util {
/**
* A utility class.
* @static
*/
export default class Util {
/**
* ⚠ Please do not instantiate this class.
*/
constructor() {}
/**
*
* @returns {object}
* Gets some information on the package.
* @type {object}
*/

@@ -10,0 +18,0 @@

@@ -7,3 +7,3 @@ {

// "incremental": true, /* Enable incremental compilation */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"target": "es2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,

@@ -10,0 +10,0 @@ // "lib": [], /* Specify library files to be included in the compilation. */

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc