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

@deepakatariya/ac-scope

v1.0.3

Published

This package helps you set your resources in application context so that you can access them in any corner of your application without importing.

Readme

Application Context Scope (ac-scope)

npm version

Table of Contents

Description

ac-scope lets you load your resource in the global environment/scope and lets you access it from anywhere in your application while developing.

I recommend you to import this package while starting up the application (In bootloader files).

There are multiple use cases of this package, so that you can use those resources from anywhere in your application while coding:

  • Loading and maintaining database connection.
  • Logging system can be used in application context it can save you from importing everytime.
  • Keeping logged in user details.
  • Keeping configuration details which should be loaded in your app once by env files, config jsons, etc .

Please comment for other use cases as well.

Important

  • Now you can access your resources directly your key (please see the example below) or I have defined a variable name applicationContext. To use, I recommend applicationContext to set and get your resource. It is compatible with most of the javascript based framework such as react.js, node.js, etc

Features

  • Set value in application context (gloabally) in the form of {key,value}.
  • Get value in application context (gloabally).

Installing

Using npm:

$ npm install ac-scope

Example

In order to set the variable in the application context, use the following approach:

applicationContext.set("key", "value");

In order to access your resources in the application context using get('key') method using default keyword applicationContext , use the following approach:

applicationContext.get("key");

In order to access your resources in the application context using directky key with default keyword applicationContext.key, use the following approach:

applicationContext.key;

In order to access your resources in the application context using directky key without default keyword key, use the following approach:

const s = key //using directly `key` saves you from writing `applicationContext` again and again;

You can also free up the space by deleting, for doing use the following approach:

applicationContext.delete("key");

Wonder! what is the source of this variable? It is actually loaded in your global scope when you imported/used this package in your application.

Credits

It is wrapper code that uses global variables provided by environment such as browser, node default modules, v8, etc

License

MIT