complete histoly simply

This commit is contained in:
Shin'ya Ueoka 2017-09-17 21:32:05 +09:00
parent 49fc34e444
commit 66de4a59d0
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,10 @@
const getCompletions = (keyword) => {
return browser.history.search({
text: keyword,
startTime: '1970-01-01'
}).then((items) => {
return items.sort((x, y) => x.lastVisitTime < y.lastVisitTime).slice(0, 10);
});
};
export { getCompletions };