# @umm/singleton

> Provide Singleton accessor to any class.

Latest version **1.0.0** (published 2017-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @umm/singleton
pnpm add @umm/singleton
yarn add @umm/singleton
bun add @umm/singleton
```

## 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.0 |
| Published | 2017-09-11 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Tetsuya Mori |
| Maintainers | monry |

## Links

- npm: https://www.npmjs.com/package/@umm/singleton
- Repository: https://github.com/umm-projects/singleton
- Issues: https://github.com/umm-projects/singleton/issues
- npm.io page: https://npm.io/package/@umm/singleton

## Dependencies (4)

- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [glob](https://npm.io/package/glob.md) ^7.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.1

## Recent versions

- 1.0.0 (latest) — 2017-09-11

## README

# What?

* Singleton なアクセスを可能にする static アクセサを提供します。

# Why?

* シンプルな Singleton 機構を作りたかったので作りました。

# Install

```shell
$ npm install github:umm-projects/singleton
```

# Usage

```csharp
using UnityEngine;
using UnityModule;

public class SampleSingleton : Singleton<SampleSingleton> {

    public string Hoge = "ほげ";

}

public class Sample {

    public void Run() {
        Debug.Log(SampleSingleton.Instance.Hoge);
    }

}
```

* `Singleton<T>` を継承したクラスを作るだけです。
* `<T>` には作成するクラスをそのまま用います。

# License

Copyright (c) 2017 Tetsuya Mori

Released under the MIT license, see [LICENSE.txt](LICENSE.txt)

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