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

libvantage

v0.3.3

Published

Utilities for creating awesome editors for Vantage.

Downloads

11

Readme

This is the official library used to create Xbox One saved game editors for Vantage.

Pull requests are very welcome!

Crypto API

  • alder32(buffer: Buffer, initial?: number): number
  • crc32(buffer: Buffer, offset?: number, length?: number, seed?: number): number
  • fnv0(value: string, init: number, prime: number): number

Components

  • card - Hosts all other components.
    • <card label="God Mode"><!-- component --></card>
  • v-button - Just a button.
    • <v-button click.trigger="increaseHealth()">Increase Health</v-button>
  • v-switch - A switch with an on or off state.
    • <v-switch value.bind="unlimitedAmmo"></v-switch>
  • v-text - A text input.
    • <v-text value.bind="squadName"></v-text>
  • v-number - Numeric input with - and + buttons.
    • <v-number value.bind="ammo" min="0" max="100"></v-number>
  • v-slider - Number slider with value label.
    • <v-slider value.bind="gravity" min="0" max="10" step="0.1"></v-slider>
  • v-selection - A combo box/selection input.
    • <v-selection value.bind="color" options.bind="[{value: 'blue', label: 'Blue'}, {value: 'red', label: 'Red'}]"></v-selection>
  • v-tree - Host named components in an expandable tree.
    • <v-tree nodes.bind="nodes"></v-tree> See below for usage

Tree Component

The tree component (v-tree) is an expandable list of other components. It supports all the other inputs provided by the library (button, switch, text, number, slider, selection). The tree is rendered using an array of TreeNode objects that you bind to nodes.

Here's a basic example of a Player Stats node that expands to reveal a Health slider.:

this.nodes = [
  {
    name: "Player Stats",
    nodes: [
      {
        name: "Health",
        component: {
          type: "slider",
          value: player.currentHealthValue,
          min: 0,
          max: 100000,
          step: 100,
        }
      }
    ]
  }
];

The value can use computed properties if required:

...
component: {
  ...
  get value(): number {
    return player.currentHealthValue * 10;
  },
  set value(health: number) {
    player.currentHealthValue = health / 10;
  },
  ...
},
...

Value Converters

Arrays

  • pluck - Get an array of property values of the given objects.
    • weapons | pluck:'name'
  • take - Get the first n elements of an array.
    • inventory | take:5
  • sort - Sort an array by the given property.
    • weapons | sort:'name'

Numbers

  • formatNumber - Format a number with commas.
    • gold | formatNumber
  • byteFormat - Convert bytes to KB, MB, GB, etc.
    • bytes | byteFormat

Objects

  • objectKeys - Get an array of an object's own property names.
    • dvars | objectKeys

Stream

Stream is a wrapper around Node's Buffer class that makes reading and writing to Buffers less verbose. See stream.ts for implementation details.

Miscellaneous and Internal

  • setEditor(editor: SaveEditor) - Set the editor implementation used by Vantage. This is done by main.ts in the Editor Skeleton.
  • openDevTools() - Open Chrome's dev tools. This is done automatically by Vantage in development mode. You can also press Ctrl + Shift + D.