Skip to content

Commit

Permalink
style(cloudinary): remove dangle comma (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
huynl-96 authored Jan 31, 2023
1 parent a55b8b2 commit 2f5b64b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/runtime/providers/cloudinary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defu } from 'defu'
import type { ProviderGetImage } from '../../types'
import { createOperationsGenerator } from '#image'

const convertHextoRGBFormat = (value: string) => value.startsWith('#') ? value.replace('#', 'rgb_') : value
const convertHexToRgbFormat = (value: string) => value.startsWith('#') ? value.replace('#', 'rgb_') : value
const removePathExtension = (value: string) => value.replace(/\.[^/.]+$/, '')

const operationsGenerator = createOperationsGenerator({
Expand All @@ -29,7 +29,7 @@ const operationsGenerator = createOperationsGenerator({
colorSpace: 'cs',
customFunc: 'fn',
density: 'dn',
aspectRatio: 'ar',
aspectRatio: 'ar'
},
valueMap: {
fit: {
Expand All @@ -48,10 +48,10 @@ const operationsGenerator = createOperationsGenerator({
jpeg: 'jpg'
},
background (value: string) {
return convertHextoRGBFormat(value)
return convertHexToRgbFormat(value)
},
color (value: string) {
return convertHextoRGBFormat(value)
return convertHexToRgbFormat(value)
},
gravity: {
auto: 'auto',
Expand Down
1 change: 1 addition & 0 deletions src/types/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface CloudinaryModifiers extends ImageModifiers {
colorSpace: string
customFunc: string
density: number
aspectRatio: string
}

export interface CloudinaryOptions {
Expand Down

0 comments on commit 2f5b64b

Please sign in to comment.