Skip to content

Commit 042bdf4

Browse files
committed
refactor: rename objectIsEmpty to isEmptyObject
1 parent f9bdd53 commit 042bdf4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/package.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import GlobPatterns from "#core/glob/patterns";
1414
import Locale from "#core/locale";
1515
import SemanticVersion from "#core/semantic-version";
1616
import Table from "#core/text/table";
17-
import { confirm, mergeObjects, objectIsEmpty, repeatAction, shellQuote } from "#core/utils";
17+
import { confirm, isEmptyObject, mergeObjects, repeatAction, shellQuote } from "#core/utils";
1818
import * as yaml from "#core/yaml";
1919
import Git from "#lib/git";
2020
import lintFile from "#lib/lint/file";
@@ -1296,7 +1296,7 @@ export default class Package {
12961296
const dependencies = new Dependencies( config );
12971297
dependencies.fix();
12981298

1299-
if ( config.scripts && objectIsEmpty( config.scripts ) ) {
1299+
if ( config.scripts && isEmptyObject( config.scripts ) ) {
13001300
delete config.scripts;
13011301
}
13021302
}

lib/package/docs/options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fetch from "#core/fetch";
2-
import { isPlainObject, objectIsEmpty } from "#core/utils";
2+
import { isEmptyObject, isPlainObject } from "#core/utils";
33
import * as yaml from "#core/yaml";
44
import prismjs from "#lib/prism-js";
55
import DEFAULT_TYPES from "#resources/docs-types.js";
@@ -77,8 +77,8 @@ export default class Options {
7777

7878
// cleanup
7979
if ( !options.logo ) delete options.logo;
80-
if ( objectIsEmpty( options.types ) ) delete options.types;
81-
if ( objectIsEmpty( options.alias ) ) delete options.alias;
80+
if ( isEmptyObject( options.types ) ) delete options.types;
81+
if ( isEmptyObject( options.alias ) ) delete options.alias;
8282

8383
return this.#sortObject( options );
8484
}

0 commit comments

Comments
 (0)