Guest User

Untitled

a guest
Oct 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. /**
  2. * @param {Array} target 目标数组
  3. * @param {Array} arr 需要查询的数组
  4. * @description 判断要查询的数组是否至少有一个元素包含在目标数组中
  5. */
  6. export const hasOneOf = (targetarr, arr) => {
  7. return targetarr.some(_ => arr.indexOf(_) > -1)
  8. }
Add Comment
Please, Sign In to add comment