packages/api/src/routes/metaplex-upload.js
/**
 * What has it got in its pocketses?
 * Just a getter that makes sure tag values are actually strings, if they're present at all.
 *
 * @param {Record<string, string>} tags a string map of tag names to values
 * @param {string} name the name of the tag we want
 *
 * @returns {string|undefined} the tag value, if it exists
 * @throws {ErrorInvalidMetaplexToken} if a tag value is present but has a non-string value
 */


@param {Record} tags a string map of tag names to values
@param {string} name the name of the tag we want

@returns {string|undefined} the tag value, if it exists
@throws {ErrorInvalidMetaplexToken} if a tag value is present but has a non-string value
@param { Record } tags a string map of tag names to values @param { string } name the name of the tag we want @returns { string|undefined } the tag value if it exists @throws { ErrorInvalidMetaplexToken } if a tag value is present but has a non - string value
function stringOrNothing(tags, name) {
  if (name in tags && typeof tags[name] !== 'string') {
    throw new ErrorInvalidMetaplexToken(
      `"${name}" tag must have a string value if present`
    )
  }
  return tags[name]
}
function stringOrNothing ( tags , name ) { if ( name in tags && typeof tags [ name ] !== 'string' ) { throw new ErrorInvalidMetaplexToken ( ` ${ name } ` ) } return tags [ name ] }
What has it got in its pocketses?
What has it got in its pocketses?