
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
vue3-writer-views
Advanced tools
vue3-writer-views 是一个vue3的基于chatgpt模式的打字机效果组件库,支持静态数据流,动态数据流,支持代码着色,代码复制,简化开发,
npm install vue3-writer-views
or
pnpm install vue3-writer-views
# 指令参数
export interface TypewriterOptions {
privated?: boolean // 是否静态数据, 静态数据: 是一次获取的静态数据,非静态:频繁获取数据流的比如 res.body.getReader()
text: string // 数据
speed?: number // 打字速度,单位是毫秒
cursor?: boolean // 是否显示光标
isScrollToBottom?: boolean // 显示容器是否滚动到底部
}
# 参数增加
{
className: {
type: String,
default: ""
}
}
import {setThemeStyle} from 'vue3-writer-views'
import {WriterCodeThemeLang,ThemeList} from 'vue3-writer-views/src/theme'
// WriterCodeThemeLang 类型
// ThemeList 所有主题可以for 循环
setThemeStyle("a11y-dark")
主题名称(ThemeList)
export type HighlightLanguage =
| "a11y-dark"
| "a11y-light"
| "agate"
| "an-old-hope"
| "androidstudio"
| "arduino-light"
| "arta"
| "ascetic"
| "atom-one-dark-reasonable"
| "atom-one-dark"
| "atom-one-light"
| "brown-paper"
| "codepen-embed"
| "color-brewer"
| "dark"
| "default"
| "devibeans"
| "docco"
| "far"
| "felipec"
| "foundation"
| "github-dark-dimmed"
| "github-dark"
| "github"
| "gml"
| "googlecode"
| "gradient-dark"
| "gradient-light"
| "grayscale"
| "hybrid"
| "idea"
| "intellij-light"
| "ir-black"
| "isbl-editor-dark"
| "isbl-editor-light"
| "kimbie-dark"
| "kimbie-light"
| "lightfair"
| "lioshi"
| "magula"
| "mono-blue"
| "monokai-sublime"
| "monokai"
| "night-owl"
| "nnfx-dark"
| "nnfx-light"
| "nord"
| "obsidian"
| "panda-syntax-dark"
| "panda-syntax-light"
| "paraiso-dark"
| "paraiso-light"
| "pojoaque"
| "purebasic"
| "qtcreator-dark"
| "qtcreator-light"
| "rainbow"
| "routeros"
| "school-book"
| "shades-of-purple"
| "srcery"
| "stackoverflow-dark"
| "stackoverflow-light"
| "sunburst"
| "tokyo-night-dark"
| "tokyo-night-light"
| "tomorrow-night-blue"
| "tomorrow-night-bright"
| "vs"
| "vs2015"
| "xcode"
| "xt256"
1. 指令使用
import {VueTypeWriter} from 'vue3-writer-views'
const app = createApp(App)
app.directive("type-writer", VueTypeWriter)
app.mount("#app")
使用
定义数据
const staticText1 = `当然可以,请看下面的JavaScript代码示例:
\`\`\`javascript
function bubbleSort(arr) {
var len = arr.length;
for (var i = 0; i < len; i++) {
for (var j = 0; j < len - 1 - i; j++) {
if (arr[j] > arr[j + 1]) {
var temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
return arr;
}
// 示例
var arr = [64, 34, 25, 12, 22, 11, 90];
console.log(bubbleSort(arr));
\`\`\`
使用
<div v-type-writer="{ text: staticText, privated: true, speed: 10 }"></div>
2.组件使用
import {VueTypeWriterView} from 'vue3-writer-views'
const app = createApp(App)
app.component(VueTypeWriterView.name, VueTypeWriterView)
app.mount("#app")
使用
<VueWriterView :text="staticText" :privated="true" />
FAQs
A vue3 typewriter effect containing code highlights
The npm package vue3-writer-views receives a total of 4 weekly downloads. As such, vue3-writer-views popularity was classified as not popular.
We found that vue3-writer-views 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
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.