went from standardjs to eslinter with airbnb settings(untested)
This commit is contained in:
1 parent
4550d06224
commit
657c8a1a9b
41 files changed
+2257
-817
No files matched your search
@@ -1,26 +1,19 @@
|
||||
export const capitalize = (string) => {
|
||||
return (string).charAt(0).toUpperCase() + (string).slice(1)
|
||||
}
|
||||
export const capitalize = string => (string).charAt(0).toUpperCase() + (string).slice(1);
|
||||
|
||||
export const slugify = (text) => {
|
||||
return text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/[^\w\-]+/g, '')
|
||||
.replace(/\-\-+/g, '-')
|
||||
.replace(/^-+/, '')
|
||||
.replace(/-+$/, '')
|
||||
}
|
||||
export const slugify = text => text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/[^\w-]+/g, '')
|
||||
.replace(/--+/g, '-')
|
||||
.replace(/^-+/, '')
|
||||
.replace(/-+$/, '');
|
||||
|
||||
export const epoch = () => {
|
||||
return Math.round(new Date().getTime() / 1000)
|
||||
}
|
||||
export const epoch = () => Math.round(new Date().getTime() / 1000);
|
||||
|
||||
export const isBetween = (value, valA, valB) => {
|
||||
const min = valA < valB ? valA : valB
|
||||
const max = valA > valB ? valA : valB
|
||||
const min = valA < valB ? valA : valB;
|
||||
const max = valA > valB ? valA : valB;
|
||||
if (value >= min && value <= max) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in new issue
Block a user