Separating front and back
This commit is contained in:
1 parent
14484b493e
commit
64ce8699cb
64 files changed
+9705
-1
No files matched your search
@@ -0,0 +1,19 @@
|
||||
export const capitalize = string => (string).charAt(0).toUpperCase() + (string).slice(1);
|
||||
|
||||
export const slugify = text => text.toString().toLowerCase()
|
||||
.replace(/\s+/g, '-')
|
||||
.replace(/[^\w-]+/g, '')
|
||||
.replace(/--+/g, '-')
|
||||
.replace(/^-+/, '')
|
||||
.replace(/-+$/, '');
|
||||
|
||||
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;
|
||||
if (value >= min && value <= max) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Reference in new issue
Block a user