mirror of
https://github.com/diced/zipline.git
synced 2025-12-12 07:40:45 -08:00
fix: typo separator
This commit is contained in:
@@ -27,7 +27,7 @@ export const DATABASE_TO_PROP = {
|
||||
filesDefaultDateFormat: 'files.defaultDateFormat',
|
||||
filesRemoveGpsMetadata: 'files.removeGpsMetadata',
|
||||
filesRandomWordsNumAdjectives: 'files.randomWordsNumAdjectives',
|
||||
filesRandomWordsSeparator: 'files.randomWordsSeperator',
|
||||
filesRandomWordsSeparator: 'files.randomWordsSeparator',
|
||||
|
||||
urlsRoute: 'urls.route',
|
||||
urlsLength: 'urls.length',
|
||||
|
||||
@@ -56,7 +56,7 @@ export const ENVS = [
|
||||
env('files.defaultDateFormat', 'FILES_DEFAULT_DATE_FORMAT', 'string', true),
|
||||
env('files.removeGpsMetadata', 'FILES_REMOVE_GPS_METADATA', 'boolean', true),
|
||||
env('files.randomWordsNumAdjectives', 'FILES_RANDOM_WORDS_NUM_ADJECTIVES', 'number', true),
|
||||
env('files.randomWordsSeperator', 'FILES_RANDOM_WORDS_SEPERATOR', 'string', true),
|
||||
env('files.randomWordsSeparator', 'FILES_RANDOM_WORDS_Separator', 'string', true),
|
||||
|
||||
env('urls.route', 'URLS_ROUTE', 'string', true),
|
||||
env('urls.length', 'URLS_LENGTH', 'number', true),
|
||||
|
||||
@@ -37,7 +37,7 @@ export const rawConfig: any = {
|
||||
defaultDateFormat: undefined,
|
||||
removeGpsMetadata: undefined,
|
||||
randomWordsNumAdjectives: undefined,
|
||||
randomWordsSeperator: undefined,
|
||||
randomWordsSeparator: undefined,
|
||||
},
|
||||
urls: {
|
||||
route: undefined,
|
||||
|
||||
@@ -96,7 +96,7 @@ export const schema = z.object({
|
||||
defaultDateFormat: z.string().default('YYYY-MM-DD_HH:mm:ss'),
|
||||
removeGpsMetadata: z.boolean().default(false),
|
||||
randomWordsNumAdjectives: z.number().default(3),
|
||||
randomWordsSeperator: z.string().default('-'),
|
||||
randomWordsSeparator: z.string().default('-'),
|
||||
}),
|
||||
urls: z.object({
|
||||
route: z.string().startsWith('/').min(1).trim().toLowerCase().default('/go'),
|
||||
|
||||
@@ -20,7 +20,7 @@ export function formatFileName(nameFormat: Config['files']['defaultFormat'], ori
|
||||
return name;
|
||||
case 'random-words':
|
||||
case 'gfycat':
|
||||
return randomWords(config.files.randomWordsNumAdjectives, config.files.randomWordsSeperator);
|
||||
return randomWords(config.files.randomWordsNumAdjectives, config.files.randomWordsSeparator);
|
||||
default:
|
||||
return randomCharacters(config.files.length);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@ function importWords(): {
|
||||
}
|
||||
}
|
||||
|
||||
export function randomWords(numAdjectives: number = 2, seperator: string = '-') {
|
||||
export function randomWords(numAdjectives: number = 2, separator: string = '-') {
|
||||
const { adjectives, animals } = importWords();
|
||||
|
||||
let words = '';
|
||||
|
||||
for (let i = 0; i !== numAdjectives; ++i) {
|
||||
words += adjectives[randomIndex(adjectives.length)] + seperator;
|
||||
words += adjectives[randomIndex(adjectives.length)] + separator;
|
||||
}
|
||||
|
||||
words += animals[randomIndex(animals.length)];
|
||||
|
||||
Reference in New Issue
Block a user