createRecord (props, opts) {
    props || (props = {})
    if (utils.isArray(props)) {
      return props.map((_props) => this.createRecord(_props, opts))
    }
    if (!utils.isObject(props)) {
      throw utils.err(`${DOMAIN}#createRecord`, 'props')(400, 'array or object', props)
    }

    if (this.relationList) {
      this.relationList.forEach(function (def) {
        def.ensureLinkedDataHasProperType(props, opts)
      })
    }
    const RecordCtor = this.recordClass

    return (!RecordCtor || props instanceof RecordCtor) ? props : new RecordCtor(props, opts)
  }
Create an unsaved, uncached instance of this Mapper's
{@link Mapper#recordClass}.

Returns `props` if `props` is already an instance of
{@link Mapper#recordClass}.

__Note:__ This method does __not__ interact with any adapter, and does
__not__ save any data. It only creates new objects in memory.

@example
// Create empty unsaved record instance
const post = PostMapper.createRecord();

@example
// Create an unsaved record instance with inital properties
const post = PostMapper.createRecord({
  title: 'Modeling your data',
  status: 'draft'
});

@example
// Create a record instance that corresponds to a saved record
const post = PostMapper.createRecord({
  // JSData thinks this record has been saved if it has a primary key
  id: 1234,
  title: 'Modeling your data',
  status: 'draft'
});

@example
// Create record instances from an array
const posts = PostMapper.createRecord([{
  title: 'Modeling your data',
  status: 'draft'
}, {
  title: 'Reading data',
  status: 'draft'
}]);

@example
// Records are validated by default
import { Mapper } from 'js-data';
const PostMapper = new Mapper({
  name: 'post',
  schema: { properties: { title: { type: 'string' } } }
});
try {
  const post = PostMapper.createRecord({
    title: 1234,
  });
} catch (err) {
  console.log(err.errors); // [{ expected: 'one of (string)', actual: 'number', path: 'title' }]
}

@example
// Skip validation
import { Mapper } from 'js-data';
const PostMapper = new Mapper({
  name: 'post',
  schema: { properties: { title: { type: 'string' } } }
});
const post = PostMapper.createRecord({
  title: 1234,
}, { noValidate: true });
console.log(post.isValid()); // false

@method Mapper#createRecord
@param {Object|Object[]} props The properties for the Record instance or an
array of property objects for the Record instances.
@param {object} [opts] Configuration options.
@param {boolean} [opts.noValidate={@link Mapper#noValidate}] See {@link Mapper#noValidate}.
@returns {Record|Record[]} The Record instance or Record instances.
@since 3.0.0