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 🙏

© 2026 – Pkg Stats / Ryan Hefner

skak

v1.4.2

Published

A wheel for personal use

Readme

INFO

Project_name: SKAK
Project_code: L4601
Author: MikumoAoi
Update_date: 2025-02-25
Current_ver: 1.4.2

GUIDE

Do not use version 1.2.x, these versions can not work properly.

SKAKstd (functions)

  • getStringLength
    To calculate the length of a string, which only contains '-' and '_' and numbers and letters (length:1), kanji and kana (length:2)
    args:
    a string
    return value:
    the length of the string

    example:

    console.log(SKAKstd.getStringLength("SKAKskak"));  // 8
    console.log(SKAKstd.getStringLength("AFさくら11"));  // 10
    console.log(SKAKstd.getStringLength("三雲有桜生"));  // 10
    console.log(SKAKstd.getStringLength("155%+166%"));  // error: SKAKstd.getStringLength: STRING INCLUDES INVALID CHAR
    console.log(SKAKstd.getStringLength(435204));  // error: SKAKstd.getStringLength: TYPEOF ERROR
  • generateRandomCode
    To generate a random code string
    args:
    format
    charset
    char in format (optional, default: 'x')
    return value:
    a string

    example:

    console.log(SKAKstd.generateRandomCode("xxxxxxxx-xxxx-4xxx-8xxx-xxxxxxxxxxxx", "0123456789abcdef"));  // "a8754fc4-5422-4aa3-8977-c4cc99ae81c5"
    console.log(SKAKstd.generateRandomCode("xxxxxx", "0123456789ABCEFGHJKLMNPQRTUVWXY"));  // "8R3UN0"
    console.log(SKAKstd.generateRandomCode("CODE IS: xxxxxx-0Xxxxxxx", "0123456789ABCDEF"));  // "CODE IS: D2A8C1-0XC14ECA"
    console.log(SKAKstd.generateRandomCode("0x********", "0123456789abcdef", '*'));  // "0x4cc6b83a"
    console.log(SKAKstd.generateRandomCode("xxxxxx", 435204));  // error: SKAKstd.generateRandomCode: TYPEOF ERROR
    console.log(SKAKstd.generateRandomCode("xxxxxx", "0123456789", "xx"));  // error: SKAKstd.generateRandomCode: INVALID CHAR
  • timeoutWatcher
    To manage a timeout and allow refreshing the timer
    args:
    function to execute when the timeout completes
    function to execute when the timer is refreshed (optional)
    the timeout duration in milliseconds (optional, default: 5000)
    return value:
    a function to refresh the timer

    example:

    // The timeout will trigger after 8 seconds
    // During this time, clicking the button will refresh the timer
    let refresh = new timeoutWatcher(() => {
        alert("timeout!");
    }, () => {
        console.log("timer refreshed.");
    }, 8000);
    // Simulate a button click to refresh the timer
    refresh();  // Timer resets and will trigger after another 8 seconds
  • toLength (renamed from "zeroAdder" since v1.4.0)
    To make sure the length of something is the same
    args:
    value
    length (a integer)
    length2 (optional, default: 0, only when number, the length of decimal part, a integer)

    type of value | length | length2
    :------------ | :----- | :------
    bigint | more than 1 | undefined | 0
    boolean | more than 0 | undefined
    number | more than 1ormore than (length2 + 2) | undefined | 0orless than 21
    string | more than 1 | undefined
    undefined | more than 0 | undefined

    return value: a string

    example:

    console.log(SKAKstd.toLength(435204, 9));  // "000435204"
    console.log(SKAKstd.toLength(4352.04, 12, 4));  // "0004352.0400"
    console.log(SKAKstd.toLength(-4352.04068, 12, 4));  // "-004352.0407"
    console.log(SKAKstd.toLength(435204n, 9));  // "000435204"
    console.log(SKAKstd.toLength("SKAK", 8));  // "    SKAK"
    console.log(SKAKstd.toLength("SKAKSKAKSKAK", 8));  // "SKAKS..."
    console.log(SKAKstd.toLength(true, 4));  // "0001"
    console.log(SKAKstd.toLength(undefined, 6));  // "------"
    console.log(SKAKstd.toLength([1, 2, 3, 4], 8));  // error: SKAKstd.toLength: TYPEOF ERROR
    console.log(SKAKstd.toLength(435204, 4));  // error: SKAKstd.toLength: NUMBER IS ALREADY LONGER THAN LENGTH
    console.log(SKAKstd.toLength(435204, -6));  // error: SKAKstd.toLength: INVALID LENGTH
    console.log(SKAKstd.toLength("SKAK", 8, 0));  // error: SKAKstd.toLength: INVALID LENGTH

SKAKgeo (functions)

  • getDistance
    To calculate the distance between two points
    args:
    longitude1
    latitude1
    longitude2
    latitude2
    return value:
    distance of two points (meter)

    example:

    console.log(SKAKgeo.getDistance(138.8, 35.5, 138.7, 35.6));  // 14334.91
    console.log(SKAKgeo.getDistance(138.8, 135.5, 138.7, 35.6));  // error: SKAKgeo.getDistance: COORDINATE OUT OF RANGE

SKAKtime (constructor)

create by timestamp or undefined (default: current timestamp)

  • dateid: days count after 1998-01-25 (set/get)
  • time: timestamp (set/get)
  • timestamp: timestamp, same as time (get)
  • date: string like "YYYY-MM-DD" (get)
  • timestring: string like "YYYY-MM-DD HH:MM:SS:mmm" (get)
  • datelength: array(2) like [timestamp1, timestamp2], timestamp1 is for 00:00:00:000 of that day, timestamp2 is for 23:59:59:999 of that day (get)

example:

let skaktime = new SKAKtime();
console.log(skaktime.time); // 1723114029066
console.log(skaktime.dateid); // 9693
console.log(skaktime.timestring); // "2024-08-08 18:47:09:066"
skaktime.dateid = 9999;
console.log(skaktime.timestamp); // 1749484800000
console.log(skaktime.timestring); // "2025-06-10 00:00:00:000"

CHANGELOG

Version 1.4.2 (2025-02-25)

[Added] New function SKAKstd.timeoutWatcher has been added.
[Optimized] Handling of default parameter values for some functions has been improved.
[Optimized] Documentation improved.

Version 1.4.1 (2024-12-18)

[Optimized] Unified the rules for using single and double quotes.
[Optimized] Documentation improved.

Version 1.4.0 (2024-08-14)

[Optimized] Function SKAKstd.generateRandomCode now supports custom placeholders.
[Optimized] The logic of function SKAKstd.zeroAdder has been optimized, and it now supports long string truncation and has been renamed to SKAKstd.toLength.
[Optimized] Type checking for function parameters has been improved.
[Optimized] Added support for both CommonJS and ES6 usage methods.
[Optimized] Documentation improved.

Version 1.3.0 (2024-08-13)

[Added] Function SKAKstd.zeroAdder now supports data of type undefined.
[Fixed] Important bugs fixed.
[Optimized] Documentation improved.

Version 1.2.1 (2024-08-08) (UNAVAILABLE)

[Initial] Release the first npm package version.