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

@ge-fnm/action-object

v4.5.0

Published

This is the Action Object used within the GE FNM.

Readme

GE-FNM Action Object (@ge-fnm/action-object)

This is the Action Object used within the GE FNM.

Coverage Status

This library is a common interface between all modules. It contains a standard format for transmitting data, as well as a standard error format. If any data is going to be transmitted between any module, or any consumer and CSM, use this object.

I would like to use the library in my app

To get started with the repository in your project install it like this

Install with yarn

yarn add @ge-fnm/action-object

Install with npm

npm i @ge-fnm/action-object

Examples

Responding with a simple string

import { v1, ActionTypeV1, CommunicationMethodV1 } from '@ge-fnm/action-object'

const obj = v1.create({
  version: 1,
  actionType: ActionTypeV1.GET,
  commData: {
    commMethod: CommunicationMethodV1.HTTP,
    protocol: ProtocolV1.JSONRPC,
    username: 'john',
    password: 'adams'
  },
  modifyingValue: 'test',
  path: ['hello', 'world'],
  response: {
    data: 'hello world',
    error: null // note that if error exists, it must be a GEError
  },
  uri: 'http://localhost:5000'
})

Responding with an Error

import { v1, ActionTypeV1, CommunicationMethodV1, GEErrors } from '@ge-fnm/action-object'
const GEPAMError = GEErrors.GEPAMError
const GEPAMErrorCodes = GEErrors.GEPAMErrorCodes

const obj = v1.create({
  version: 1,
  actionType: ActionTypeV1.GET,
  commData: {
    commMethod: CommunicationMethodV1.HTTP,
    protocol: ProtocolV1.JSONRPC,
    username: 'john',
    password: 'adams'
  },
  modifyingValue: 'test',
  path: ['hello', 'world'],
  response: {
    error: new GEPAMError('test message', GEPAMErrorCodes.ADD_CLIENT_ERROR) // note that if error exists, it MUST be a GEError
  },
  uri: 'http://localhost:5000'
})

Serializing / Deserializing

const obj = v1.create({...})
const objAgain = v1.deserialize(serialized)
// objAgain now has all the same properties as obj except with an added 'id' property

// If you would like to initialize an ActionObject with a specific ID, you can do this:
// NOTE - unless for testing purposes you really shouldn't be doing this
const obj = v1.create(
{
...information
},
'ThisIsAnOptionalID'
)

GEError creation and serialization

// for PAM
import { GEErrors } from '@ge-fnm/action-object'
const GEPAMError = GEErrors.GEPAMError
const GEPAMErrorCodes = GEErrors.GEPAMErrorCodes
throw new GEPAMError('test message', GEPAMErrorCodes.ADD_CLIENT_ERROR)

// for CSM
import { GEErrors } from '@ge-fnm/action-object'
const GECSMError = GEErrors.GECSMError
const GECSMErrorCodes = GEErrors.GECSMErrorCodes
throw new GECSMError('test message', GECSMErrorCodes.NO_FORWARDING_ADDRESS)

// for ActionObject itself - you really shouldnt consume this outside of this repo
import { GEErrors } from '@ge-fnm/action-object'
const GEActionObjectError = GEErrors.GEActionObjectError
const GEActionObjectErrorCodes = GEErrors.GEActionObjectErrorCodes
throw new GEActionObjectError('test message', GEActionObjectErrorCodes.DESERIALIZATION_ERROR)

Debugging

We've added in optional logging to this module. You can enable it by setting the environment variable DEBUG:

DEBUG=ge-fnm:action-object yarn #to enable logging for only the action-object module
-or-
DEBUG=ge-fnm:* yarn # for all logging related to ge-fnm
-or-
DEBUG=* yarn # enable logging for all installed node_modules that look for the env var DEBUG - please note, this is a lot. You probably dont want this

I want to work on this project

Please see CONTRIBUTING.md