BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
56a04158
Commit
56a04158
authored
Nov 16, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential EE conflict
parent
cd0ae854
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
datetime_utility.js
app/assets/javascripts/lib/utils/datetime_utility.js
+1
-0
text_utility.js
app/assets/javascripts/lib/utils/text_utility.js
+9
-10
No files found.
app/assets/javascripts/lib/utils/datetime_utility.js
View file @
56a04158
...
...
@@ -136,6 +136,7 @@ window.dateFormat = dateFormat;
* @param {Number} seconds
* @return {String}
*/
// eslint-disable-next-line import/prefer-default-export
export
function
timeIntervalInWords
(
intervalInSeconds
)
{
const
secondsInteger
=
parseInt
(
intervalInSeconds
,
10
);
const
minutes
=
Math
.
floor
(
secondsInteger
/
60
);
...
...
app/assets/javascripts/lib/utils/text_utility.js
View file @
56a04158
...
...
@@ -18,16 +18,6 @@ export const addDelimiter = text => (text ? text.toString().replace(/\B(?=(\d{3}
export
const
highCountTrim
=
count
=>
(
count
>
99
?
'99+'
:
count
);
/**
* Capitalizes first character
*
* @param {String} text
* @return {String}
*/
export
function
capitalizeFirstCharacter
(
text
)
{
return
`
${
text
[
0
].
toUpperCase
()}${
text
.
slice
(
1
)}
`
;
}
/**
* Converst first char to uppercase and replaces undercores with spaces
* @param {String} string
* @requires {String}
...
...
@@ -65,3 +55,12 @@ export const slugify = str => str.trim().toLowerCase();
*/
export
const
truncate
=
(
string
,
maxLength
)
=>
`
${
string
.
substr
(
0
,
(
maxLength
-
3
))}
...`
;
/**
* Capitalizes first character
*
* @param {String} text
* @return {String}
*/
export
function
capitalizeFirstCharacter
(
text
)
{
return
`
${
text
[
0
].
toUpperCase
()}${
text
.
slice
(
1
)}
`
;
}
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