2.1.3 • Published 9 years ago

burrito-kingdom v2.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

BurritoKingdom

NPM version

In Burrito Kingdom, you have little say over the images used in your projects. In Burrito Kingdom, we replace every image file in a directory of your choice with a random Google image based on keyword(s) of your choice.

Functions

burritorizeFolder(directory, keywords, safeSearch, callback)

Replaces all of the image files in the relative directory with Google image search results.

Arguments

  • directory - Relative path (string) to the directory you'd like to fill with random images.
  • keywords - Single string of keywords as you would type into a Google search bar. If set to null, '', or any other false-y value, the search term will default to the name of the file being replaced.
  • safeSearch - true or false.

Example

var burritoKingdom = require('burrito-kingdom');

var directory = './public/imgs';
var keywords = 'burrito';
var safeSearch = false;

burritoKingdom.burritorizeFolder('./public/imgs', 'burrito', false, function(){
	// All images in the ./public/imgs folder have been replaced by burritos!
});

burritoWatch(directory, keywords, safeSearch)

Like burritorizeFolder, except that it continues to watch the directory for one additional change per file (or any added file).

Arguments

  • directory - Relative path (string) to the directory you'd like to fill with random images.
  • keywords - Single string of keywords as you would type into a Google search bar. If set to null, '', or any other false-y value, the search term will default to the name of the file being replaced.
  • safeSearch - true or false.

Example

var burritoKingdom = require('burrito-kingdom');

var directory = './public/imgs';
var keywords = 'burrito';
var safeSearch = false;

burritoKingdom.burritoWatch('./public/imgs', 'burrito', false);
// ./public/imgs will be filled with burritos. If one
// of those images was changed to something else, it will
// turn it back into a burrito picture (up to once per file).
// It will also replace any image added to that folder
// (while running) with a burrito.
2.1.3

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago