@yookue/ts-lang-utils
    Preparing search index...

    Function hasProp

    • Returns whether the given object has the specified property

      Parameters

      • object: any

        the object to check

      • Optionalprop: null | string

        the property name to check

      Returns boolean

      whether the object has the specified property

      David Hsing

      hasProp({foo: 'bar'}, 'foo');    // true
      hasProp({foo: 'bar'}, 'bar'); // false