# safenavigation

> safenav is a node.js module that allows to use safe navigation through properties

Latest version **1.0.1** (published 2017-08-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install safenavigation
pnpm add safenavigation
yarn add safenavigation
bun add safenavigation
```

## 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 | 2017-08-01 |
| First published | 2017-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | msv2017 |
| Maintainers | msv2017 |

## Links

- npm: https://www.npmjs.com/package/safenavigation
- Repository: https://github.com/msv2017/safenav
- Homepage: https://github.com/msv2017/safenav#readme
- Issues: https://github.com/msv2017/safenav/issues
- npm.io page: https://npm.io/package/safenavigation

## Recent versions

- 1.0.1 (latest) — 2017-08-01
- 1.0.0 — 2017-08-01

## README

# safenav

safenav is a node.js module that allows to use safe navigation through properties


## Installation
`npm install safenav`

## Usage

	var safenav = require('safenav');

	var obj ={
		p1: {
			p2: {
				p3: 123
			}
		}
	};

	var p3 = safenav(obj)(x => x.p1.p2.p3);
	console.log(p3); //prints 123
	
	var wrongPropertyName = safenav(obj)(x => x.wrong.property.name);
	console.log(wrongPropertyName); //prints undefined
	
Also, default object is allowed:

	var defaultValue = safenav(obj, false)(x => x.wrong.property.name);
	console.log(defaultValue); //prints false

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