Skip to content

Commit

Permalink
style: Prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed May 30, 2024
1 parent 7f10b2c commit aaa9256
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion array/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var resolveException = require("../lib/resolve-exception")

var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3;

module.exports = function (value /*, options*/) {
module.exports = function (value/*, options*/) {
var options = arguments[1];
var mainErrorMessage =
options && options.name ? "Expected an array for %n, received %v" : "%v is not an array";
Expand Down
2 changes: 1 addition & 1 deletion big-int/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var resolveException = require("../lib/resolve-exception")
, coerce = require("./coerce");

module.exports = function (value /*, options*/) {
module.exports = function (value/*, options*/) {
var coerced = coerce(value);
if (coerced !== null) return coerced;
var options = arguments[1];
Expand Down
2 changes: 1 addition & 1 deletion constructor/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var resolveException = require("../lib/resolve-exception")
, is = require("./is");

module.exports = function (value /*, options*/) {
module.exports = function (value/*, options*/) {
if (is(value)) return value;
var options = arguments[1];
var errorMessage =
Expand Down
2 changes: 1 addition & 1 deletion map/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var resolveException = require("../lib/resolve-exception")
, is = require("./is");

module.exports = function (value /*, options*/) {
module.exports = function (value/*, options*/) {
if (is(value)) return value;
var options = arguments[1];
var errorMessage =
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"prettier": {
"printWidth": 100,
"tabWidth": 4,
"trailingComma": "none",
"overrides": [
{
"files": [
Expand Down
2 changes: 1 addition & 1 deletion set/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var resolveException = require("../lib/resolve-exception")
, is = require("./is");

module.exports = function (value /*, options*/) {
module.exports = function (value/*, options*/) {
if (is(value)) return value;
var options = arguments[1];
var errorMessage =
Expand Down
6 changes: 3 additions & 3 deletions test/ensure.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var assert = require("chai").assert

describe("ensure", function () {
it("Should support multiple validation datums", function () {
assert.deepEqual(ensure(["foo", 12.323, ensureNumber], ["bar", 10, ensureNumber]), [
12.323, 10
]);
assert.deepEqual(
ensure(["foo", 12.323, ensureNumber], ["bar", 10, ensureNumber]), [12.323, 10]
);
});
it("Should surface only error", function () {
try {
Expand Down
7 changes: 3 additions & 4 deletions test/plain-object/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ describe("plain-object/is", function () {
it("Should return true on object with no prototype", function () {
assert.equal(isPlainObject(Object.create(null)), true);
});
it(
"Should return false on object that inherits from object with no prototype",
function () { assert.equal(isPlainObject(Object.create(Object.create(null))), false); }
);
it("Should return false on object that inherits from object with no prototypes", function () {
assert.equal(isPlainObject(Object.create(Object.create(null))), false);
});
}
it("Should return false on Object.prototype", function () {
assert.equal(isPlainObject(Object.prototype), false);
Expand Down

0 comments on commit aaa9256

Please sign in to comment.