Socket
Socket
Sign inDemoInstall

@vedantsharma/reddit

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

apiManager.d.ts

13

index.js

@@ -1,6 +0,7 @@

const s = require("@vedantsharma/reddit");
const manager = new s.Scraper();
manager.getRandom("funny").then((post) => {
console.log(post);
})
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scraper = exports.RedditPost = void 0;
var redditPost_1 = require("./redditPost");
Object.defineProperty(exports, "RedditPost", { enumerable: true, get: function () { return redditPost_1.RedditPost; } });
var apiManager_1 = require("./apiManager");
Object.defineProperty(exports, "Scraper", { enumerable: true, get: function () { return apiManager_1.Scraper; } });
import * as https from 'https';
import { RedditPost } from './redditPost';
import { RedditPost } from '../redditPost';
import * as http from 'http';
export class Scraper {
private subredditBase: string = 'https://www.reddit.com/<subreddit>.json?limit=100';
private subredditBase: string = 'https://www.reddit.com/';
private subreddits: Array<string> = ['dankmemes', 'wholesomememes'];

@@ -13,3 +13,5 @@ private randomSubreddit: string = this.subredditBase?.replace('<subreddit>', this.subreddits[Math.floor(Math.random() * this.subreddits.length)]);

constructor() { };
constructor() {
this.subredditBase = 'https://www.reddit.com/<subreddit>.json?limit=100';
};

@@ -16,0 +18,0 @@ private get(subredditUrl: string) {

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

export { RedditPost } from "./redditPost";
export { Scraper } from "./apiManager";
export { RedditPost } from "../redditPost";
export { Scraper } from "../apiManager";
{
"name": "@vedantsharma/reddit",
"version": "1.0.6",
"version": "1.0.7",
"description": "Reddit Library for Nodejs and Typescript",
"main": "dist/index.js",
"main": "index.js",
"keywords": [

@@ -35,4 +35,4 @@ "reddit api",

"dependencies": {
"@vedantsharma/reddit": "^1.0.5"
"@vedantsharma/reddit": "^1.0.6"
}
}

@@ -9,4 +9,3 @@ {

"skipLibCheck": true,
"outDir": "./dist/"
}
}
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