frontend/.pnpm-store/v3/files/54/c50c091e407a56595eff1b378ec2670eafddf3cf2d8fe85206697d952334071ac2ae809ebcd52c807e9b38e4fa71db75122ac7b8fc37dee31e3121d1f03f7c

16 lines
457 B
Plaintext

"use strict";
var resolveException = require("../lib/resolve-exception")
, coerce = require("./coerce");
module.exports = function (value/*, options*/) {
var coerced = coerce(value);
if (coerced !== null) return coerced;
var options = arguments[1];
var errorMessage =
options && options.name
? "Expected an array length for %n, received %v"
: "%v is not an array length";
return resolveException(value, errorMessage, options);
};