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

nonimageapi

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nonimageapi - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

dist/index.d.ts

6

package.json
{
"name": "nonimageapi",
"version": "1.0.3",
"version": "1.0.5",
"description": "An image api for you to have fun",

@@ -21,5 +21,2 @@ "main": "index.js",

"license": "ISC",
"dev-dependencies": {
"node-fetch": "^2.6.1"
},
"dependencies": {

@@ -31,4 +28,5 @@ "@types/node-fetch": "^2.5.11",

"devDependencies": {
"@types/superagent": "^4.1.12",
"typescript": "^4.3.5"
}
}

@@ -36,2 +36,4 @@ # NonImageApi (Beta)

- More functions for our API
- Typescript
- AND MORE!!

@@ -38,0 +40,0 @@ # Thanks to contributors

@@ -1,28 +0,26 @@

import fetch = from 'node-fetch';
import * as request from 'superagent';
let url = "https://nonimageapi.apenasigor.repl.co/api/v1/";
declare class Image {
ImageApi: string;
constructor(Image: string) {
this.ImageApi = Image;
class Image {
constructor(Image: string = "") {
}
fakemsg(msg: string, username: string, avatar: string, bot: boolean) {
if(!bot) bot = false; // Retorna falso caso usuário não coloque "bot"
if(!username) username="User"; // Caso usuário não colocar nome
if(!avatar) avatar="https://cdn.discordapp.com/embed/avatars/0.png?size=2048" // Caso usuário não colocar o url do avatar
if(!msg) new TypeError("Invalid message text") // caso o texto for inválido
if(!bot) bot = false;
if(!username) username="User";
if(!avatar) avatar="https://cdn.discordapp.com/embed/avatars/0.png?size=2048"
if(!msg) new TypeError("Invalid message text")
return url + `fake-message?avatar=${avatar}&username=${username}&text=${msg}&bot=${bot}`; // Retorna link da mensagem
return url + `fake-message?avatar=${avatar}&username=${username}&text=${msg}&bot=${bot}`;
}
async memes() {
fetch(url + `memes`).then(res => res.json()).then(data => {
return data;
});
const res = await request.get(url + `memes`);
return res.body;
};
async cats() {
fetch(url + `cats`).then(res => res.json()).then(data => {
return data;
});
const res = await request.get(url + `cats`);
return res.body;
};
}
export = Image;

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

import nonimageapi = from './index.ts';
import image = new nonimageapi();
let test = images.fakemsg("bomdia", "nome-legal", null, true);
console.log(test);
let json = images.memes(true);
console.log(json);
import nonimageapi from './index';
const images = new nonimageapi();
async function test() {
let json = await images.memes();
console.log(json);
}

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

"forceConsistentCasingInFileNames": true,
"allowJs": true
"esModuleInterop": true,
"declaration": true,
"outDir": "dist"
},

@@ -15,4 +17,5 @@ "main": "index.ts",

"files":[
"index.ts"
"src/index.ts",
"src/test.ts"
]
}

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