src/resource/Resource.js
/**
   * Find some of the resources by 'name' or a single identifier key-value pair.
   * A convenience method for using the 'filter' parameter.
   *
   * @param {object|string} updateKey - String 'name' or object containing single key-value pair.
   * @returns {Promise} Promise that resolves when the request returns.
   */
Find some of the resources by 'name' or a single identifier key-value pair.
A convenience method for using the 'filter' parameter.

@param {object|string} updateKey - String 'name' or object containing single key-value pair.
@returns {Promise} Promise that resolves when the request returns.
Find some of the resources by ' name ' or a single identifier key - value pair . A convenience method for using the ' filter ' parameter . @param { object|string } updateKey - String ' name ' or object containing single key - value pair . @returns { Promise } Promise that resolves when the request returns .
async find (updateKey) {
    const params = { filter: `name=${updateKey}` }
    if (typeof updateKey === 'object') {
      const pairs = Object.entries(updateKey)
      if (pairs.length > 1) {
        throw new Error('Only one key-value pair may be specified for find()')
      }
      const [key, value] = pairs[0]
      params.filter = `identifiers.${key}=${value}`
    }
    return this.read({ params })
  }
async find ( updateKey ) { const params = { filter : ` ${ updateKey } ` } if ( typeof updateKey === 'object' ) { const pairs = Object . entries ( updateKey ) if ( pairs . length > 1 ) { throw new Error ( 'Only one key-value pair may be specified for find()' ) } const [ key , value ] = pairs [ 0 ] params . filter = ` ${ key } ${ value } ` } return this . read ( { params } ) }
Find some of the resources by 'name' or a single identifier key-value pair.
Find some of the resources by ' name ' or a single identifier key - value pair .