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

js-faster

v1.0.3

Published

js-faster is a support library for development in JavaScript and TypeScript. Provides many features and tools to help optimize performance and increase the execution speed of source code.

Downloads

21

Readme

js-faster 🐶

Intall

npm i js-faster

or

yarn add js-faster

English document: VIEW ENGLISH

Tài liệu tiếng việt: XEM BẰNG TIẾNG VIỆT

How to use

1. formatDateString

Formats a Date object into a date string (DD/MM/YYYY).

const formattedDate = formatDateString(new Date());
// Result: 09/01/2024

2. formatDateTimeString

Formats a Date object into a time and date string (HH:mm DD/MM/YYYY).

const formattedDateTime = formatDateTimeString(new Date());
// Result: 16:46 09/01/2024

3. formatNumberWithCommas

Converts an integer to a string with comma-separated format.

const formattedNumber = formatNumberWithCommas(1000000);
// Result: 1,000,000

4. parseFormattedNumber

Converts a string with commas to an integer.

const parsedNumber = parseFormattedNumber("1,000,000");
// Result: 1000000

5. toUpperCase

Converts a string to uppercase.

const upperCaseString = toUpperCase("hello world");
// Result: HELLO WORLD

6. toLowerCase

Converts a string to lowercase.

const lowerCaseString = toLowerCase("Hello World");
// Result: hello world

7. arrayToStringWithCommas

Converts an array to a string, joining elements with commas.

const stringFromArray = arrayToStringWithCommas([1, 2, 3]);
// Result: 1,2,3

8. parseStringToArray

Converts a comma-separated string to an array of integers.

const arrayFromString = parseStringToArray("1,2,3");
// Result: [1, 2, 3]

9. isInteger

Checks if a value is an integer.

const result = isInteger(42);
// Result: true
const result = isInteger("42");
// Result: false

10. getRandomNumberInRange

Generates a random number within a specified range.

const randomNum = getRandomNumberInRange(1, 100);
// Result: [Random number between 1 and 100]

11. isArray

Checks if a value is an array.

const result = isArray([1, 2, 3]);
// Result: true
const result = isArray(1);
// Result: false

12. sortAscending

Sorts an array in ascending order.

const sortedArray = sortAscending([3, 1, 2]);
// Result: [1, 2, 3]

13. sortDescending

Sorts an array in descending order.

const sortedArray = sortDescending([3, 1, 2]);
// Result: [3, 2, 1]

14. containsNumber

Checks if a string contains a numeric character.

const result = containsNumber("Hello123");
// Result: true

Contact

NGUYEN PHUC BAO CHAU

  • Website: https://ischau.org
  • Website 2: https://dovuihainao.com
  • Website 3: https://thatthuvi.com/react-practical
  • Telegram: https://t.me/baochau9xx
  • Facebook: https://facebook.com/baochau9xx
  • Mail: [email protected]

Keyword

baochau9xx, green, js-faster, react-practical, react tools, react-native, native, baochau, thatthuvi