# hide-protected-properties

> Hide properties of a class/instance that start with an underline, which are often seemed as protected or private.

Latest version **0.1.1** (published 2018-05-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hide-protected-properties
pnpm add hide-protected-properties
yarn add hide-protected-properties
bun add hide-protected-properties
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2018-05-21 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ayon Lee |
| Maintainers | hyurl |
| Keywords | hide, property |

## Links

- npm: https://www.npmjs.com/package/hide-protected-properties
- Repository: https://github.com/hyurl/hide-protected-properties
- Homepage: https://github.com/hyurl/hide-protected-properties#readme
- Issues: https://github.com/hyurl/hide-protected-properties/issues
- npm.io page: https://npm.io/package/hide-protected-properties

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2018-05-21
- 0.1.0 — 2018-02-04

## README

# Hide-Protected-Properties

**Hide properties of a class/instance that start with an underline, which are**
**often seemed as protected or private.**

## Example

```javascript
const HideProtectedProperties = require("hide-protected-properties");
const { EventEmitter } = require("events");

var sym = Symbol("");

class Test extends EventEmitter {
    constructor() {
        super();
        this.text = "Hello, World!";
        this._shouldHide = "Hi, everyone!";
        this[sym] = "Also hide!";
    }
}

HideProtectedProperties(Test);

console.log(Test); // => [Function: Test]
console.log(new Test); // => Test { text: 'Hello, World!' }
```

```typescript
import HideProtectedProperties = require("hide-protected-properties");

@HideProtectedProperties
class Test extends EventEmitter {
    // ...
}
```

**Notice**: this function won't delete any property of the class, just hides 
them when logging to the console.

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