Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
parse-duration-tr
Advanced tools
parse-duration
modülü için Türkçe desteği.
Yazı halindeki süreyi milisaniye cinsine çevirir.
Kod:
import parse from 'parse-duration-tr'
CommonJS kodu:
const parse = require('parse-duratio-tr')
string
i ms cinsine çevirir.
const ns = parse('1ns') // => 1 / 1e6
const us = parse('1us') // => 1 / 1000
const ms = parse('1ms') // => 1
const s = parse('1s') // => ms * 1000
const d = parse('1d') // => s * 60
const sa = parse('1sa') // => d * 60
const g = parse('1g') // => sa * 24
const h = parse('1h') // => g * 7
const y = parse('1y') // => g * 365.25
Ayrıca basit cümleleri de dönüştürebilir:
parse('1sa 20dk') // => 1 * sa + 20 * d
parse('1 sa 20 dak') // => 1 * sa + 20 * d
youtube formatı
parse('1sa20d0s') // => 1 * sa + 20 * d
Virgüllüler:
parse('27,681 ns') // => 27681 * ns
Diğer türler:
parse('süre: 1sa:20d') // => 1 * sa + 20 * d
Ve e
parse('2e3s') // => 2000 * s
Hatta kendi formatlarınızı da ekleyebilirsiniz:
parse.salise = parse.saniye / 60;
parse('salise') // 16.6
Çıkış formatı da ayarlanabilir.
parse('1 saat 20 dakika', 'dakika') // => 80
Geliştirilmiş özellikler:
FAQs
Yazıları süreye çevirir.
We found that parse-duration-tr 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.