# singelton-app

> A very simple module to create a singelton application, which instance can be required from other modules in an application.

Latest version **1.0.1** (published 2016-03-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install singelton-app
pnpm add singelton-app
yarn add singelton-app
bun add singelton-app
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-03-16 |
| First published | 2016-03-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mattias Wennerholm |
| Maintainers | mw.localizedirect.com |
| Keywords | singelton, application, global, app |

## Links

- npm: https://www.npmjs.com/package/singelton-app
- npm.io page: https://npm.io/package/singelton-app

## Recent versions

- 1.0.1 (latest) — 2016-03-16

## README

# singelton-app
With this very simple module you can create a singelton application instance (global application instance) that can be required/imported by other modules in the same application, so that they all share the same instance of the application module.

## How to use
All you need to do is to require the singelton-app from your main module (for example app.js) and then extend it with your application functions:

app.js
```javascript
var app = require('singelton-app');

app.extend({

  initialize: function () {
    console.log( 'initialize function' );
  },

  sayHello: function () {
    console.log( 'Hello!' );
  }

});

app.initialize();
```

Then you can access the extended functions of the singelton application from any project module with:

someModule.js
```javascript
var app = require('singelton-app');

exports.someFunction = function() {
    app.sayHello();
});
```

---
_Source: https://npm.io/package/singelton-app · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
