Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Latest commit

 

History

History
32 lines (24 loc) · 738 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 738 Bytes

Rem

Rem supports users work, like a maid.

Usage

new Rem(config: Object)

If the input is google レム --images, it is parsed by yargs-parser and config.google.exec is executed with querys = ['レム'] and options = { images: true }.

e.g.) index.js

const open = require('open');
const Rem = require('../');

new Rem({
	google: {
		description: 'Search Google for ${querys[0]}',
		minQuerysLength: 1,
		exec: (querys, options) => {
			if (options.hasOwnProperty('images')) {
				open(`https://www.google.co.jp/search?q=${querys[0]}&tbm=isch`);
			} else {
				open(`https://www.google.co.jp/search?q=${querys[0]}`);
			}
		}
	}
});