Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
vue-hljs-with-line-number
Advanced tools
Vue.js syntax highlighting made easy, using highlight.js.
Simply install the npm package vue-hljs-with-line-number
:
npm install --save vue-hljs-with-line-number
In your main JavaScript file (eg. main.js
):
// Import Vue and vue-highlgihtjs
import Vue from 'vue'
import VueHljs from 'vue-highlightjs'
import 'vue-hljs-with-line-number/line-number.css';
// Tell Vue.js to use vue-hljs-with-line-number
Vue.use(VueHljs)
In your template, in order to highlight javascript code:
<!-- If your source-code lives in a variable called 'sourcecode' -->
<pre v-hljs="sourcecode">
<code class="javascript"></code>
</pre>
<!-- If you want to highlight hardcoded source-code -->
<pre v-hljs>
<code class="javascript">
const s = new Date().toString()
</code>
</pre>
Author: Chris Hager chris@linuxuser.at (https://www.metachris.com)
License: MIT
Contributors:
v1.0.7
<span></span>
.v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
FAQs
Syntax highlighting with highlight.js for Vue.js 2.x
The npm package vue-hljs-with-line-number receives a total of 4 weekly downloads. As such, vue-hljs-with-line-number popularity was classified as not popular.
We found that vue-hljs-with-line-number 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.