mirror of https://gitlab.com/curben/blog
style: array destructuring
https://github.com/airbnb/javascript#destructuring--array
This commit is contained in:
parent
3b4e5e2240
commit
b4dd405a5a
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
hexo.extend.tag.register('cloudinary', (args) => {
|
hexo.extend.tag.register('cloudinary', (args) => {
|
||||||
const user = 'curben'
|
const user = 'curben'
|
||||||
const fileName = args[0]
|
let [fileName, alt] = args
|
||||||
const alt = args[1] || ''
|
if (!alt) alt = ''
|
||||||
let modern = ''
|
let modern = ''
|
||||||
let legacy = ''
|
let legacy = ''
|
||||||
const link = 'https://cdn.statically.io/img/res.cloudinary.com/' + user
|
const link = 'https://cdn.statically.io/img/res.cloudinary.com/' + user
|
||||||
|
|
Loading…
Reference in New Issue