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

Pull dominantColors per https://github.com/randytarampi/lwip/pull/28 #30

Merged
merged 13 commits into from
Apr 28, 2020

Conversation

randytarampi
Copy link
Owner

Closes #28 and EyalAr#255

@randytarampi randytarampi added the enhancement New feature or request label Apr 27, 2020
@randytarampi randytarampi self-assigned this Apr 27, 2020

let the_key = '0,0,0,0',
count = 0;
for (let key in colorCounter) {
Copy link

Choose a reason for hiding this comment

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

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

}
}

let the_key = '0,0,0,0',
Copy link

Choose a reason for hiding this comment

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

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

const colorCounter = {};
for (let i = 0; i < this.width(); i++) {
for (let j = 0; j < this.height(); j+= skips+1) {
const pixel = this.__lwip.getPixel(i,j),
Copy link

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


const colorCounter = {};
for (let i = 0; i < this.width(); i++) {
for (let j = 0; j < this.height(); j+= skips+1) {
Copy link

Choose a reason for hiding this comment

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

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

}

const colorCounter = {};
for (let i = 0; i < this.width(); i++) {
Copy link

Choose a reason for hiding this comment

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

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

throw Error('Pass a positive integer argument for number of pixels to skip over each iteration');
}

const colorCounter = {};
Copy link

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

let dominantColor;
judges.dominantColor(
arguments,
skips => {
Copy link

Choose a reason for hiding this comment

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

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

@@ -82,6 +83,47 @@ module.exports = class Image {
};
}

dominantColor () {
let dominantColor;
Copy link

Choose a reason for hiding this comment

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

'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@pull-assistant
Copy link

@coveralls
Copy link

coveralls commented Apr 27, 2020

Pull Request Test Coverage Report for Build 246

  • 20 of 20 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 97.361%

Totals Coverage Status
Change from base Build 240: 0.1%
Covered Lines: 514
Relevant Lines: 523

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 246

  • 20 of 20 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 97.361%

Totals Coverage Status
Change from base Build 240: 0.1%
Covered Lines: 514
Relevant Lines: 523

💛 - Coveralls

@randytarampi randytarampi merged commit 0df3162 into master Apr 28, 2020
@randytarampi randytarampi deleted the feat/pull-dominantColors branch April 28, 2020 04:39
@randytarampi
Copy link
Owner Author

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants