Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wildcat
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jason Zhou
wildcat
Commits
a7568fb3
Commit
a7568fb3
authored
Jul 30, 2018
by
Jason Zhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add log util
parent
7662f88a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
log.js
packages/utils/log.js
+21
-0
No files found.
packages/utils/log.js
0 → 100644
View file @
a7568fb3
const
chalk
=
require
(
'chalk'
)
const
titleColor
=
title
=>
chalk
.
yellowBright
(
title
)
const
itemColor
=
item
=>
chalk
.
green
(
item
)
const
title
=
title
=>
{
console
.
log
(
titleColor
(
`
${
title
}
\n`
))
}
const
item
=
item
=>
{
console
.
log
(
itemColor
(
`
${
item
}
\n`
))
}
module
.
exports
=
{
log
:
{
title
,
item
},
colors
:
{
title
:
titleColor
,
item
:
itemColor
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment