stringifyIds.js 280 B

123456789
  1. export default function stringifyIds(rawResult) {
  2. if (_isPlainObject(rawResult) && _has(rawResult, "id")) {
  3. _update(rawResult, "id", _toString)
  4. } else if (_isArray(rawResult)) {
  5. _forEach(rawResult, (entry) => _update(entry, "id", _toString))
  6. }
  7. return rawResult
  8. }