Skip to content

This library gives back an random fox picture link or when you like it an custom message/link. It's coded in Typescript and can be used in Javascript and Typescript.

Notifications You must be signed in to change notification settings

Minecodes/randomfox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randomfox

This is an library to get an link to an random fox image.
This is a API and now in TypeScript too. 👍😉 CodeFactor

The cli version: https://www.npmjs.com/package/foxes
How to work with Typescript: https://www.typescriptlang.org/docs
It work in the browser too.

Installation ✅

Browser:

<script src="https://unpkg.com/randomfox/src/browser.js">
console.log(fox());
console.log(customfox(["Floof 1", "Floof 2", "Floof 3", "Floof 4"]));
</script>

Browser Minified:

<script src="https://unpkg.com/randomfox/src/browser.min.js">
console.log(fox());
console.log(customfox(["Floof 1", "Floof 2", "Floof 3", "Floof 4"]));
</script>

Console/Etc:

npm i randomfox

or

yarn install randomfox

or

npm i git+https://gitlab.com/Minecodes13/randomfox.git

or

yarn install git+https://gitlab.com/Minecodes13/randomfox.git

or

npm i git+https://github.com/Minecodes/randomfox.git

or

yarn install git+https://github.com/Minecodes/randomfox.git

Docs 🧐🤓

Javascript

Example

const randomfox = require("randomfox");

console.log(fox());

Random fox Image

const { fox } = require("randomfox");

console.log(fox());

Custom fox Images

const { customfox } = require("../src/main");

console.log(customfox([
	"https://randomfox.ca/images/1.jpg",
	"https://randomfox.ca/images/2.jpg",
	"https://randomfox.ca/images/3.jpg"]));

Typescript

Example

import randomfox from "randomfox";

console.log(randomfox.fox());

Random fox image

import { fox } from "randomfox";

console.log(fox());

Custom fox Images

import { customfox } from "randomfox";

console.log(customfox([
	"https://randomfox.ca/images/1.jpg",
	"https://randomfox.ca/images/2.jpg",
	"https://randomfox.ca/images/3.jpg"]));

Licenses

About

This library gives back an random fox picture link or when you like it an custom message/link. It's coded in Typescript and can be used in Javascript and Typescript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published