Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Blaine Schmeisser
committed
Jan 11, 2017
1 parent
af5948f
commit 1980965
Showing
2 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
module.exports = (pluginContext) => { | ||
return { | ||
respondsTo: (query) => { | ||
return query.match(/hello.*/) | ||
}, | ||
search: (query, env = {}) => { | ||
const name = query.split(/\s+/)[1] || '' | ||
const title = name ? `Hello, ${name}!` : 'Hello!' | ||
return new Promise((resolve, reject) => { | ||
resolve([ | ||
{ | ||
icon: 'fa-hand-spock-o', | ||
title, | ||
subtitle: 'Please type your name!', | ||
}, | ||
]) | ||
}) | ||
}, | ||
return (name, env = {}) => { | ||
return new Promise((resolve, reject) => { | ||
resolve([ | ||
{ | ||
icon: 'fa-hand-spock-o', | ||
title: `Hello, ${name}!`, | ||
subtitle: 'Please type your name!', | ||
} | ||
]) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters