UNPKG

jsonapi-serializer

Version:

A Node.js framework agnostic library for serializing your data to JSON API

14 lines (10 loc) 238 B
'use strict'; var ErrorUtils = require('./error-utils'); module.exports = function (opts) { if (!opts) { opts = []; } if (Array.isArray(opts)) { return new ErrorUtils(opts); } else { return new ErrorUtils([opts]); } };