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

oakwood

v2.3.1

Published

A library that connects to your server and allows you to write custom gamemodes/scripts/tools.

Readme

oakwood-node

A library that connects to your server and allows you to write custom gamemodes/scripts/tools.

Instructions

While getting oakwood package is as simple as installing it via npm, it requires a specific dependencies to be met depending on a platform:

Ubuntu

To install oakwood package on Ubuntu, you need to install prerequisite system packages we use natively:

  1. $ apt install python2.7
  2. $ apt install libnanomsg-dev
  3. Follow the rest of the guide.

Windows

On Windows, we need to make sure essential build tools are installed on the machine:

  1. npm install --global windows-build-tools
  2. Then we can safely follow the rest of the guide.

Setup

First, we need to install the oakwood package. Having met the system dependencies, oakwood package should be successfully built and installed to your folder via: $ npm i oakwood --save

Afterwards, you can simply create a new file such as freeride.js, copy an example from below and launch it to start the gamemode. As you can see, using the oakwood package is just matter of require-ing specific methods or resources you need.

Don't forget to set up your connection strings on both sides so that your gamemode can communicate with the server!

Documentation

You can visit the following docs page to learn more about the API we use. You can also find an interesting read about how this gamemode works behind the scene here.

Example

A minimal example showcasing the basic usage of the library.

const {createClient} = require('oakwood')
const oak = createClient()

oak.event('start', async () => {
    console.log("[info] connected to the server")
    oak.log("[info] hello world from nodejs")
})

oak.event('playerConnect', async pid => {
    console.log('[info] player connected', pid)

    oak.playerPositionSet(pid, [-1774.59301758, -4.88487052917, -2.40491962433])
    oak.playerHealthSet(pid, 200)
    oak.playerSpawn(pid)
})

oak.cmd('goto', async (pid, targetid) => {
    const tid = parseInt(targetid)

    if (tid === NaN) {
        return oak.chatSend(pid, `[error] provided argument should be a valid number`)
    }

    if (await oak.playerInvalid(tid)) {
        return oak.chatSend(pid, `[error] player you provided was not found`)
    }

    /* get target position */
    const pos = await oak.playerPositionGet(tid)

    /* set our player position */
    oak.playerPositionSet(pid, pos)
})

A more detailed example can be checked out in example.js file.