Improvment in tslint standard (#16)

This commit is contained in:
Qolzam
2017-10-10 16:39:02 +07:00
parent 181d2b8abd
commit 1937742f04
160 changed files with 984 additions and 1019 deletions

View File

@@ -8,8 +8,8 @@ export const detectTags = (content,character) => {
}
export const getContentTags = (content) => {
var newTags = []
var tags = detectTags(content,'#')
let newTags = []
let tags = detectTags(content,'#')
tags.forEach((tag)=>{
newTags.push(tag.slice(1))
})
@@ -17,13 +17,13 @@ export const getContentTags = (content) => {
}
export const sortObjectsDate = (objects) => {
var sortedObjects = objects;
let sortedObjects = objects
// Sort posts with creation date
sortedObjects.sort((a, b) => {
return parseInt(b.creationDate) - parseInt(a.creationDate)
});
})
return sortedObjects;
return sortedObjects
}