Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
locales,
converter
})
const demoboard = create()
demoboard.section('Examples').add('Basic Usage', {
component: toReact(BasicUsage),
readme: BasicUsage.$readme,
code: BasicUsage.$code
}).add('Auto Update', {
component: toReact(AutoUpdate),
readme: AutoUpdate.$readme,
code: AutoUpdate.$code
}).add('Custom Converter', {
component: toReact(CustomConverter),
readme: CustomConverter.$readme,
code: CustomConverter.$code
})
mount(demoboard, '#app', {
title: 'Vue Timeago',
readme
})
demoboard.addDecorator(item => {
const Component = item.options.component
item.options.component = toReact({
render(h) {
return h('div', {
class: 'component-decorator'
}, [h(CSSReset), h(Component)])
}
})
})
})
Vue.use(Timeago, {
locale: 'en',
locales,
converter
})
const demoboard = create()
demoboard.section('Examples').add('Basic Usage', {
component: toReact(BasicUsage),
readme: BasicUsage.$readme,
code: BasicUsage.$code
}).add('Auto Update', {
component: toReact(AutoUpdate),
readme: AutoUpdate.$readme,
code: AutoUpdate.$code
}).add('Custom Converter', {
component: toReact(CustomConverter),
readme: CustomConverter.$readme,
code: CustomConverter.$code
})
mount(demoboard, '#app', {
title: 'Vue Timeago',
readme
})
const locales = {}
r.keys().forEach(v => {
const [, name] = /^\.\/([\w\_]+)\/index\.js/.exec(v)
locales[name] = r(v)
})
Vue.use(Timeago, {
locale: 'en',
locales,
converter
})
const demoboard = create()
demoboard.section('Examples').add('Basic Usage', {
component: toReact(BasicUsage),
readme: BasicUsage.$readme,
code: BasicUsage.$code
}).add('Auto Update', {
component: toReact(AutoUpdate),
readme: AutoUpdate.$readme,
code: AutoUpdate.$code
}).add('Custom Converter', {
component: toReact(CustomConverter),
readme: CustomConverter.$readme,
code: CustomConverter.$code
})
mount(demoboard, '#app', {
title: 'Vue Timeago',
readme
})