mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-21 13:39:30 -07:00
refractor: change var name
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { type ImageData } from './utils'
|
||||
|
||||
// fetch images info from JSON
|
||||
const imageArrayElement = document.getElementById('images_array') as HTMLScriptElement
|
||||
const rawImageArray = imageArrayElement.textContent as string
|
||||
export const imagesArray: ImageData[] = JSON.parse(rawImageArray).sort(
|
||||
const imageArrayElement = document.getElementById('images_info') as HTMLScriptElement
|
||||
const rawImagesInfo = imageArrayElement.textContent as string
|
||||
export const imagesInfo: ImageData[] = JSON.parse(rawImagesInfo).sort(
|
||||
(a: ImageData, b: ImageData) => {
|
||||
if (a.index < b.index) {
|
||||
return -1
|
||||
@@ -11,4 +11,4 @@ export const imagesArray: ImageData[] = JSON.parse(rawImageArray).sort(
|
||||
return 1
|
||||
}
|
||||
)
|
||||
export const imagesArrayLen: number = imagesArray.length
|
||||
export const imagesLen: number = imagesInfo.length
|
||||
|
||||
Reference in New Issue
Block a user