Function isAccessor

  • Parameters

    • object: any

      Object to search

    • field: string

      Object field

    Returns boolean

    Description

    Check object field to be getter or sestter

    Example

    import { object } from '@biorate/tools';

    const obj = {
    _value: 0,

    get value() {
    return this._value;
    },

    set value(value: number) {
    this._value = value;
    },
    };

    console.log(object.isAccessor(obj, 'value')); // true

Generated using TypeDoc