aboutsummaryrefslogtreecommitdiff
path: root/node_modules/acorn/src/util.js
blob: 9f548a140e59fde7382fdf0fb61a7caee2fe503b (plain)
1
2
3
4
5
6
7
8
9
10
11
const {hasOwnProperty, toString} = Object.prototype

// Checks if an object has a property.

export function has(obj, propName) {
  return hasOwnProperty.call(obj, propName)
}

export const isArray = Array.isArray || ((obj) => (
  toString.call(obj) === "[object Array]"
))