windows-cursor-icon
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    Windows Cursor Icon

    Get the Windows cursor icon in different image formats.

    Install

    npm i windows-cursor-icon
    

    Usage

    const { getCursorIcon, ImageFormat } = require("windows-cursor-icon");
    
    const cursorIcon = getCursorIcon({ imageFormat: ImageFormat.Png });
    
    console.log(cursorIcon);
    // Prints:
    // {
    //   hasChanged: true,
    //   isHidden: false, 
    //   id: 65541,
    //   buffer: <Buffer 89 50 4e 47 0d  04 ...>,       
    //   imageFormat: 'Png',
    //   xHotspot: 8,
    //   yHotspot: 9
    // }
    
    // The icon is in buffer, so it can be saved to a file, for example:
    require("fs").writeFileSync("cursorIcon.png", cursorIcon.buffer);

    Check more examples here!

    Install

    npm i windows-cursor-icon

    DownloadsWeekly Downloads

    18

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    17.6 kB

    Total Files

    7

    Last publish

    Collaborators

    • felladrin