Added short code length field to form to create short URLs

This commit is contained in:
Alejandro Celaya
2020-03-29 18:55:41 +02:00
parent 9a20b4428d
commit bd29670108
5 changed files with 60 additions and 19 deletions

View File

@@ -2,7 +2,7 @@ import L from 'leaflet';
import marker2x from 'leaflet/dist/images/marker-icon-2x.png';
import marker from 'leaflet/dist/images/marker-icon.png';
import markerShadow from 'leaflet/dist/images/marker-shadow.png';
import { range } from 'ramda';
import { isEmpty, isNil, range } from 'ramda';
const TEN_ROUNDING_NUMBER = 10;
const DEFAULT_TIMEOUT_DELAY = 2000;
@@ -45,3 +45,4 @@ export const rangeOf = (size, mappingFn, startAt = 1) => range(startAt, size + 1
export const roundTen = (number) => ceil(number / TEN_ROUNDING_NUMBER) * TEN_ROUNDING_NUMBER;
export const hasValue = (value) => !isNil(value) && !isEmpty(value);