npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

system-x64

v2.2.1

Published

System based on c# to javascript

Downloads

110

Readme

What is system-x64?

system-x64 is a package that is based on C# conversions. Transacting functionally like DateTime.

Installing

npm i system-x64

or

yarn add system-x64

Convert

Using

import { Convert } from "system-x64";
import { Convert } from "system-x64";

console.log({
  toDate: Convert.toDate("24/02/2023", {
    culture: "pt-BR",
    default: new Date(),
  }),
  toNumber: Convert.toNumber("123.456,78", { culture: "pt-BR", default: 0 }),
  toBoolean: Convert.toBoolean("f"),
  toDecimal: Convert.toDecimal("123.456,78", { culture: "pt-BR", default: 0 }),
  toString: Convert.toString("test  "),
  toMoney: Convert.toMoney(123456, { prefix: 'R$', fixed: 2, culture: 'pt-BR', default: 0 }),
});

result:

{
  toDate: 2023-02-24T03:00:00.000Z,
  toNumber: 123.45678,
  toBoolean: false,
  toDecimal: 123.45678,
  toString: 'test',
  toMoney: 'R$ 123.456,00'
}

Timer

Using

import { Timer } from "system-x64";
import { Timer } from "system-x64";

const timer = new Timer(1000, () => console.log('timer', new Date()));

timer.start();

setTimeout(() => console.log('timer', timer.running), 3000);

setTimeout(() => timer.stop(), 5000);

result:

timer 2023-04-01T13:18:47.198Z
timer 2023-04-01T13:18:48.213Z
timer 2023-04-01T13:18:49.218Z
timer true
timer 2023-04-01T13:18:50.218Z
timer 2023-04-01T13:18:51.231Z

Task

Using

import { Task } from "system-x64";
import { Task } from "system-x64";

async function test() {

    console.log('delay before', new Date())
    await Task.delay(2000);
    console.log('delay after', new Date())

}

test();

result:

delay before 2023-04-01T13:48:42.403Z
delay after 2023-04-01T13:48:44.420Z

Guid

Using

import { Guid } from "system-x64";
import { Guid } from "system-x64";

const guid = Guid.newGuid();

console.log(guid.toString());
console.log(Guid.isValid('e7f95b06-4e49-7e66-a917-e05ed74f4a75'));

result:

7b94b288-adf5-8d70-f469-2edd851d88b0
true

License

MIT