# @forensic-js/node-utils

> A collection of day-to-day utility methods specifically for Node environment

Latest version **1.0.2** (published 2020-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @forensic-js/node-utils
pnpm add @forensic-js/node-utils
yarn add @forensic-js/node-utils
bun add @forensic-js/node-utils
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-01-27 |
| First published | 2019-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Harrison Ifeanyichukwu |
| Maintainers | harrison-ifeanyichukwu |
| Keywords | utility-methods, node-utils, make-directory, get-entry-path, common-functions |

## Links

- npm: https://www.npmjs.com/package/@forensic-js/node-utils
- Repository: https://github.com/harrison-ifeanyichukwu/node-utils
- Homepage: https://github.com/harrison-ifeanyichukwu/node-utils#readme
- Issues: https://github.com/harrison-ifeanyichukwu/node-utils/issues
- npm.io page: https://npm.io/package/@forensic-js/node-utils

## Dependencies (2)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.4.3
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) 7.4.3

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-01-27
- 1.0.1 — 2020-01-27
- 1.0.0 — 2019-05-06

## README

# Node-Utils

[![Build Status](https://travis-ci.org/harrison-ifeanyichukwu/node-utils.svg?branch=master)](https://travis-ci.org/harrison-ifeanyichukwu/node-utils)
[![Coverage Status](https://coveralls.io/repos/github/harrison-ifeanyichukwu/node-utils/badge.svg?branch=master)](https://coveralls.io/github/harrison-ifeanyichukwu/node-utils?branch=master)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![npm version](https://badge.fury.io/js/%40forensic-js%2Fnode-utils.svg)](https://badge.fury.io/js/%40forensic-js%2Fnode-utils)
![npm](https://img.shields.io/npm/dt/%40forensic-js%2Fnode-utils.svg)

Node-Utils is a collection of day-to-day utility methods usable in both node and browser environments. It is developed for reusability purpose and for fast project development, letting you focus on what matters in your application.

Because it is a typescript project, you get excellent auto-completion and type checks.

## Installation

```bash
npm install @forensic-js/node-utils
```

## Usage Sample

```typescript
import {getEntryPath, isProdEnv, isDevEnv. isTestEnv, mkDirSync} from '@forensic-js/node-utils';

process.env.NODE_ENV = 'production';
console.log(isProdEnv()); //logs true

process.env.NODE_ENV = 'test';
console.log(isTestEnv()); //true
console.log(isDevEnv()); //returns true as long as env is not in production

process.env.NODE_ENV = '';
console.log(isTestEnv()); //false
console.log(isDevEnv()); //true

//iteratively creates the folder is it does not exist
mkDirSync('a directory or file path');

//gets the project root directory by inspection
getEntryPath();
```

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