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.
persian-vue-timeago
Advanced tools
A timeago component for Vue.
$ npm install --save vue-timeago
It's also available on NPMCDN: https://npmcdn.com/vue-timeago/index.umd.js
import VueTimeago from 'vue-timeago'
Vue.use(VueTimeago, {
name: 'timeago', // component name, `timeago` by default
locale: 'en-US',
locales: {
'en-US': require('vue-timeago/locales/en-US.json')
}
})
Then in your lovely component:
<!-- simple usage -->
<!-- time is a dateString that can be parsed by Date.parse() -->
<timeago :since="time"></timeago>
<!-- Auto-update time every 60 seconds -->
<timeago :since="time" :auto-update="60"></timeago>
<!-- max time, time before this will not be converted -->
<!-- otherwise use custom formatTime function to format -->
<!-- 86400 * 365 = a year -->
<timeago :since="time" :max-time="86400 * 365" :format="formatTime"></timeago>
<!-- custom locale -->
<!-- use a different locale instead of the global config -->
<timeago :since="time" locale="zh-CN"></timeago>
A very basic demo: https://egoistian.com/vue-timeago
For all supported languages, see /locales, feel free to submit a Pull Request to help us support more languages!
I use rollup to build the cjs and umd version bundles, and use vbuild to build the example. Install them globally and then see the npm scripts.
MIT © EGOIST
FAQs
persian local timeago
The npm package persian-vue-timeago receives a total of 1 weekly downloads. As such, persian-vue-timeago popularity was classified as not popular.
We found that persian-vue-timeago 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.