Skip to content

Instantly share code, notes, and snippets.

@zanematthew
Created September 5, 2017 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zanematthew/68d9381524967b80d3b394f231ecb26e to your computer and use it in GitHub Desktop.
Save zanematthew/68d9381524967b80d3b394f231ecb26e to your computer and use it in GitHub Desktop.
// A
return state[item_type].indexOf(item_id) != -1 ? true : false;
// B
return Boolean(state[item_type].find(items => items === item_id));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment