
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@chenfengyuan/create-vue-component
Advanced tools
Convert anything to a Vue component.
dist/
├── create-vue-component.js (UMD)
├── create-vue-component.min.js (UMD, compressed)
├── create-vue-component.common.js (CommonJS, default)
└── create-vue-component.esm.js (ES Module)
npm install @chenfengyuan/create-vue-component
createVueComponent(content, options)
content
*
options
(optional)
Object
tag
String
'span'
data
*
content
is a render function.(return value)
Object
render
property value.template
property value.import createVueComponent from '@chenfengyuan/create-vue-component';
createVueComponent({
template: '<p>Hello, World!</p>',
});
// will render as: <p>Hello, World!</p>
createVueComponent('<strong>Hello, World!</strong>');
// will render as: <span><strong>Hello, World!</strong></span>
createVueComponent('Hello, World!');
// will render as: <span>Hello, World!</span>
createVueComponent('Hello, World!', {
tag: 'p',
});
// will render as: <p>Hello, World!</p>
createVueComponent(true);
// will render as: <span>true</span>
createVueComponent(1);
// will render as: <span>1</span>
createVueComponent(['Hello', 'World']);
// will render as: <span>Hello,World</span>
createVueComponent(function content(createElement, data, context) {
return createElement('p', `Hello, ${data.name}!`);
}, {
data: {
name: 'World',
},
});
// will render as: <p>Hello, World!</p>
createVueComponent({});
// will render as: <span>[object Object]</span>
createVueComponent();
// will render as: <span>undefined</span>
MIT © Chen Fengyuan
FAQs
Convert anything to a Vue component.
We found that @chenfengyuan/create-vue-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.