Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6: migrated "extension" #1081

Merged
merged 1 commit into from
Apr 18, 2017
Merged

ES6: migrated "extension" #1081

merged 1 commit into from
Apr 18, 2017

Conversation

gregor
Copy link
Contributor

@gregor gregor commented Apr 14, 2017

No description provided.

@lipis lipis mentioned this pull request Apr 14, 2017
79 tasks
@gregor gregor force-pushed the extension branch 7 times, most recently from 01a09ca to bbaaad4 Compare April 18, 2017 15:47
* @returns {Promise} Resolves with a random matching gif
*/
get_random_gif(options) {
return new Promise((resolve, reject) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the promise

*/
get_gifs(options) {
return new Promise((resolve, reject) => {
let offset = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove promise


let index = 0;
while (index < options.number) {
const gif = gifs[index];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for (let gif of gifs.slice(0, options.number)) instead of while

@gregor gregor merged commit 3b145dd into dev Apr 18, 2017
@gregor gregor deleted the extension branch April 18, 2017 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants