# yn-js

> Replaces boolean values with a string equivalent (e.g.: Yes / No)

Latest version **0.0.3** (published 2017-05-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install yn-js
pnpm add yn-js
yarn add yn-js
bun add yn-js
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-05-26 |
| First published | 2017-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joshua Miller |
| Maintainers | joshuamil |
| Keywords | yes, no, boolean, string, replace, display |

## Links

- npm: https://www.npmjs.com/package/yn-js
- Repository: https://github.com/joshuamil/yn-js
- Homepage: https://github.com/joshuamil/yn-js#readme
- Issues: https://github.com/joshuamil/yn-js/issues
- npm.io page: https://npm.io/package/yn-js

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2017-05-26
- 0.0.2 — 2017-05-26
- 0.0.1 — 2017-05-26

## README

# yn-js

`yn-js` replaces boolean values (e.g.: yes/no, true/false, 1/0, etc.) with user-specified strings (e.g.: 'Yes/No', 'On/Off', 'A/B').

## Install

```
$ npm install yn-js
```


## Usage

```js
const yn = require('./yn-js');
let str = ['Yes', 'No'];

// Returns 'True'
let a = yn(true);
console.log(a);

// Returns 'No'
let b = yn(false, str);
console.log(b);

// Returns 'B'
let c = yn(false, ['A', 'B']);
console.log(c);

// Returns 'Bad'
let d = yn('0', ['Good', 'Bad']);
console.log(d);

// Returns 'Good'
let e = yn('1', ['Good', 'Bad']);
console.log(e);

```

## Options

`yn-js` accepts the following parameters.

### input (Boolean = '')
The string value you wish to obfuscate or mask from the viewer.

### separator (Array = ['True', 'False'])
An array of values you wish to display for "truthy" and "falsy" statements in that order. Truthy statements include one of: `true`, `1`, `'1'`, `'yes'`, `'on'`, `'true'`

## license

ISC

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