Skip to content

Commit 5a3b19b

Browse files
jrolfsgithub-actions[bot]
authored andcommitted
chore: add getPkgName util
1 parent e3065f9 commit 5a3b19b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ const hasFile = (...p) => fs.existsSync(fromRoot(...p))
5252
const ifFile = (files, t, f) =>
5353
arrify(files).some(file => hasFile(file)) ? t : f
5454

55+
const getPkgName = () => pkg.name
56+
5557
const hasPkgProp = props => arrify(props).some(prop => has(pkg, prop))
5658

5759
const hasPkgSubProp = pkgProp => props =>
@@ -164,11 +166,12 @@ module.exports = {
164166
appDirectory,
165167
fromRoot,
166168
getConcurrentlyArgs,
169+
getPkgName,
170+
hasAnyDep,
167171
hasFile,
168172
hasLocalConfig,
169173
hasPkgProp,
170174
hasScript,
171-
hasAnyDep,
172175
ifAnyDep,
173176
ifDep,
174177
ifDevDep,

0 commit comments

Comments
 (0)