rsnext/examples/with-cloudinary/utils/range.ts
Hassan El Mghari 57dc7207e6
Add with-cloudinary example (#43250)
Added an image gallery example using Next.js and Cloudinary.

Edit: This is now ready to ship!

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-12-02 04:05:34 +00:00

11 lines
225 B
TypeScript

export const range = (start: number, end: number) => {
let output = []
if (typeof end === 'undefined') {
end = start
start = 0
}
for (let i = start; i < end; i += 1) {
output.push(i)
}
return output
}