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

Methods are too specific. #1

Open
matdombrock opened this issue Jun 19, 2019 · 2 comments
Open

Methods are too specific. #1

matdombrock opened this issue Jun 19, 2019 · 2 comments

Comments

@matdombrock
Copy link
Owner

Having state.full, state.color, state.brightness ect. is just too specific and not really helpful. You can just pass a single value to state.full.

This are kind of nice, but probably should not be part of the main wrapper.

@matdombrock
Copy link
Owner Author

I should split the methods into two groups. "Easy" and "Full". Full methods will take JSON input and Easy methods will rely on the Full methods but take string or number input.

I should maybe also create "Utility" methods like "token".

@matdombrock
Copy link
Owner Author

matdombrock commented Jun 19, 2019

I could also maybe do something like:

exports.state = async function (type, data, selector="all"){
  switch(type){
    [...]
  }
  [...]
}

Where type could be "full", "color", "brightness" ect.

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

No branches or pull requests

1 participant