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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@raydeck/session-manager

v1.4.0

Published

Session manager to manage caching class data in serverless contexts

Readme

@raydeck/session-manager - v1.4.0

@raydeck/session-manager - v1.4.0

Index

Interfaces

Type aliases

Variables

Functions

Type aliases

LambdaFunctionType

Ƭ LambdaFunctionType: function

Defined in index.ts:87

Type declaration:

▸ (a: any, b?: any, c?: any): any

Parameters:

Name | Type | ------ | ------ | a | any | b? | any | c? | any |

Variables

Let registry

registry: object

Defined in index.ts:19

Type declaration:


Const schemeRegistry

schemeRegistry: object

Defined in index.ts:18

Type declaration:

Functions

addClass

addClass(newClass: Schemable): Promise‹void›

Defined in index.ts:46

Add a scheme-able class to the session registry

Parameters:

Name | Type | Description | ------ | ------ | ------ | newClass | Schemable | Class -implementing static scheme property and getFromUri method - to add to the registry for lookups |

Returns: Promise‹void›


flushSession

flushSession(): void

Defined in index.ts:84

Flush the session of cached files

Returns: void


getFromId

getFromIdT›(schemeOrClass: string | Schemable, id: string): Promise‹T›

Defined in index.ts:54

Retrieve from the registry, async to permit a load. Uses the class/scheme to limit the lookup

Type parameters:

T

Parameters:

Name | Type | Description | ------ | ------ | ------ | schemeOrClass | string | Schemable | Scheme (e.g. "myClass") or classname ("MyClass") to look up | id | string | id global within the class domain |

Returns: Promise‹T›


getFromItem

getFromItemT›(schemeOrClass: string | Schemable, item: object): Promise‹T›

Defined in index.ts:25

Load an item based on map of data (usually from database)

Type parameters:

T

Parameters:

Name | Type | Description | ------ | ------ | ------ | schemeOrClass | string | Schemable | Scheme (e.g. "myClass") or classname ("MyClass") to look up | item | object | Map of attributes to load from |

Returns: Promise‹T›


getFromUri

getFromUriT›(uri: string): Promise‹T›

Defined in index.ts:72

Retrieve from the registry, async to permit a load if it was not previously saved

Type parameters:

T

Parameters:

Name | Type | Description | ------ | ------ | ------ | uri | string | URI of object to retrieve |

Returns: Promise‹T›


isCached

isCached(uri: string): boolean

Defined in index.ts:149

Determine if an object with this uri is already cached

Parameters:

Name | Type | Description | ------ | ------ | ------ | uri | string | |

Returns: boolean


remove

remove(uri: string): void

Defined in index.ts:142

Removes an instance from the reistry by the uri

Parameters:

Name | Type | Description | ------ | ------ | ------ | uri | string | URI of the element to remove |

Returns: void


set

set(o: Sessionable): void

Defined in index.ts:134

Save an object instance to the session registry

Parameters:

Name | Type | Description | ------ | ------ | ------ | o | Sessionable | instance to save in registry |

Returns: void


withBatch

withBatch(f: LambdaFunctionType): (Anonymous function)

Defined in index.ts:104

Wraps a function to be used in a AWS Appsync Batch invocation

Parameters:

Name | Type | Description | ------ | ------ | ------ | f | LambdaFunctionType | function to wrap |

Returns: (Anonymous function)


Const withSession

withSession(f: LambdaFunctionType): (Anonymous function)

Defined in index.ts:92

Wraps a function to guarantee a new session before it runs

Parameters:

Name | Type | Description | ------ | ------ | ------ | f | LambdaFunctionType | function to wrap |

Returns: (Anonymous function)

@raydeck/session-manager - v1.4.0Schemable

Interface: Schemable

Interface for static elements on a class

Hierarchy

  • Schemable

Index

Properties

Methods

Properties

Optional getFromItem

getFromItem? : undefined | function

Defined in index.ts:10


Optional idToUri

idToUri? : undefined | function

Defined in index.ts:8


scheme

scheme: string

Defined in index.ts:6

Methods

get

get(id: string): Promise‹Sessionable

Defined in index.ts:9

Parameters:

Name | Type | ------ | ------ | id | string |

Returns: Promise‹Sessionable


getFromUri

getFromUri(uri: string): Promise‹Sessionable

Defined in index.ts:7

Parameters:

Name | Type | ------ | ------ | uri | string |

Returns: Promise‹Sessionable

@raydeck/session-manager - v1.4.0Sessionable

Interface: Sessionable

Interface for instance elements on a class. (Much simpler requirement)

Hierarchy

  • Sessionable

Index

Methods

Methods

getUri

getUri(): string

Defined in index.ts:16

Returns: string