code: function define (options) {
    options = options || {}
    var initial = options.init
    var check = options.check
    var context = options.self
    var readonly = options.readonly || false
  
    function accessor (input) {
      // setter
      if (arguments.length) {
        if (readonly) throw errorReadonly
        if (!isValid(input, check, this)) throw errorInvalid
        accessor.value = input
        return this
      }
  
      // getter
      return accessor.value
    }
  
    accessor.value = initial
    return context ? accessor.bind(context) : accessor
  }
docs: Returns an accessor (getter/setter) function.
  
  @param {Object} [options]
  Options object.
  
  @param {Function|RegExp} [options.check]
  Predicate to check value against.
  
  @param {*} [options.init]
  Initial/default value.
  
  @param {Boolean} [options.readonly=false]
  Whether accessor is read only.
  
  @param {Object} [options.self]
  Object context.
  
  @return {Function}
  Accessor function.