alisa.ms
v0.1.3
Published
ms modülünün türkçe ve daha gelişmiş versiyonu
Downloads
8
Readme
Kaynak dosyası
Yaratıcılar
Sosyal medya hesabı
Nedir bu modül?
Bu modülü ms modülünün türkçe versiyonu gibi düşünebilirsiniz
Fakat bu versiyon klasik ms versiyonundan daha güçlü ve daha pratiktir
Elinizde "12345 gün" gibi bir değer var ve siz bunu milisaniye cinsinden yazmak istiyorsanız bu modül tam da size göre
Peki nasıl kullanılır?
Çok kolay, ilk önce herhangi bir javascript (.js) dosyası açınız ve alttaki kodu yazınız (fakat bunu yazmandan önce npm i alisa.ms ile modülü indirmelisiniz)
const mstr = require("alisa.ms")
İşte bu kadar şimdi istediğiniz işlemleri gerçekleştirebilirsiniz
Örnekler
Diyelim ki elinizde "12345 gün" diye bir yazınız var ve siz bunu milisaniye cinsinden görmek istiyorsunuz
mstr("12345 gün") // 1066608000000
// Veee işte bu kadar, 12345 günün kaç milisaniye olduğunu öğrendiniz tebrikleerrr 🎉
Gördüğünüz gibi modül gayet basit ve anlaşılabilir
Eğer girdiğiniz değeri milisaniye cinsinden değil de dakika cinsinden görmek istiyorsanız aşağıdaki gibi yazabilirsiniz
mstr("12345 gün", "dakika") // 17776800
// Gördüğünüz gibi 2. parametre olarak döndürülecek değeri girdiğinizde o değer cinsinden döndürür
Üstelik sadece 1 değer girmek zorunda değilsiniz! İçine istediğiniz kadar zaman ifadesi içerek veri giriniz yine çalışacaktır
mstr("1 asır, 25 yıl, 5 ay, 15 gün, 8 saat, 9 dakika, 10 saniye, 213 salise") // 3958985350000
// Gördüğünüz gibi içine istediğiniz kadar veri yazmakta tamamen özgürsünüz!
Ve son olarak
Eğer bu modülü geliştirmek istiyorsanız github üzerinden bana istekte bulunursanız size seve seve yardımcı olurum
Buraya kadar okuduğunuz için teşekkür ederimmmm, iyi ki varsınız 💗
Sonraki modüllerde görüşmek üzereeeeee!!!