# @ryniaubenpm2/saepe-corporis-ullam

> 🎉 announcing dotenvx. run anywhere, multi-environment, encrypted envs.

Latest version **1.0.0** (published 2024-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ryniaubenpm2/saepe-corporis-ullam
pnpm add @ryniaubenpm2/saepe-corporis-ullam
yarn add @ryniaubenpm2/saepe-corporis-ullam
bun add @ryniaubenpm2/saepe-corporis-ullam
```

## 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 | 2024-05-01 |
| First published | 2024-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 22.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ryniaube |
| Maintainers | mi762136 |
| Keywords | enumerable, ava, curl, recursive, install, qs, fastify, react-hooks, less compiler, Object.assign, code points, callback, swf, eslint-plugin, elb, endpoint, mru, search, RxJS, node, bundling, internal slot, ES2022, serialize, hasOwnProperty, Uint8ClampedArray, mixins, jQuery, Streams, Uint16Array, interrupts, pretty, iterator, walk, watchFile, elm, findup, s3, console, deepclone, typesafe, uninstall, ajv, set, postcss, [[Prototype]], Underscore, ECMAScript 2020, exec, ES2021, sigint, getopt, es5, reuse, value, private data, hasOwn, bcrypt, ses, queue, weakset, jwt, censor, styling, byte, signals, byteLength, StyleSheet, package, toobject, safe, Array, restful, uuid, iteration, telephone, vest, URLSearchParams, amazon, Array.prototype.findLast, superstruct, spinner, typeof, immer, env, property, speed, deep-copy, operating-system, text, gdpr, dotenv, state, styleguide, tslib, worker, from, east-asian-width, chrome, terminal, polyfill, lesscss, compile less, tostringtag, jsdiff, pipe, descriptor, Observable, ReactiveX, l10n, picomatch, wordbreak, parse, sinatra, shrinkwrap, korean, command-line, sameValueZero, superagent, TypeScript, remove, Iterator, last, types, crypto, omit, proto, emoji, es-shims, entries, byteOffset, redact, which, ES, formatting, child, Object.is, ECMAScript 5, url, proxy, wordwrap, define, globals, inference, beanstalk, rangeerror, ES2018, promises, Function.prototype.name, helpers, shared, bundler, glacier, type, loading, setter, commander, deepcopy, windows, folder, preprocessor, plugin, rfc4122, bind, efficient, fs, core, isConcatSpreadable, walking, mimetypes, extra, css variable, rate, vpc, chai, autoprefixer, password, auth, group, autoscaling, predictable, columns, expression, react-testing-library, patch, regexp, stringify, serializer, @@toStringTag, prune, argparse, rm -fr, Microsoft, fastcopy, syntax, regular expressions, eventDispatcher, util, limited, shim, stdlib, packages, variables in css, json, move, diff, importexport, validation, weakmap, await, ES2017, hooks, break, compiler, AsyncIterator, urls, is, ECMAScript 2022, package manager, less.js, react, own, sharedarraybuffer, BigUint64Array, drop, browserslist, chinese, persistent, react-hook-form, prototype, functions, es2016, process, full, mapreduce, es2018, postcss-plugin, identifiers, io-ts, lockfile, cloudformation, less mixins, exit, has-own, handlers, dom-testing-library, middleware, mime, monorepo, WebSockets, styles, form-validation, es, performance, live, extend, toArray, stream, modules, dataView, object, typedarrays, consume, xdg, Int32Array, linewrap, matches, take, trimStart, rm, ec2, kinesis, scheme-validation, watch, stable, configurable, streams, number, tty, symlinks, character, mime-db, minimal, art, collection, storagegateway, bluebird, streams2, express, Array.prototype.flatten, sorted, testing, trimRight, lru, args, assertion, circular, Float64Array, pnpm9, Int8Array, tdd, limit, setPrototypeOf, look, css-in-js, ECMAScript 2021, asserts, pyyaml, jsdom, fsevents, accessor, rapid, zod, fullwidth, directory, ratelimit, jasmine, watching, serialization, date, argv, term, RFC-6455, Object.defineProperty, arguments, ES7, call-bind, config, command, api, protocol-buffers, Symbol, schema, class-validator, lazy, input, function, jsonpath, iterate, duplex, xterm, macos, findLastIndex, exit-code, whatwg, jshint, bootstrap css, typedarray, invariant, find-up, Promise, escape, Float32Array, Array.prototype.flatMap, ansi, xdg-open, aws, valid, name, compare, installer, executable, regular, agent, mocha, match, dynamodb, css nesting, generics, ECMAScript 7, signal, busy, real-time, findLast, flag, dayjs, dataview, -0, column, channel, assert, parser, Object.getPrototypeOf, characters, typeerror, cloudwatch, npm, router, computed-types, queueMicrotask, slice, error, Uint8Array, promise, irq, tools, framework, performant, URL, values, browser, rds, typanion, parents, dom, estree, settings, listeners, ascii, logger, preserve-symlinks, flatten, parent, Object.entries, sort, Array.prototype.contains, Push, ArrayBuffer.prototype.slice, electron, unicode, prop, offset, slot, map, eslint, make, Object.fromEntries, events, delete, ebs, matchAll, rgb, concurrency, indicator, ES2019, CSS, metadata, push, structuredClone, .env, opener, TypedArray, joi, batch, concat, TypeBox, ECMAScript 2016, module, wget, assign, ES5, regular expression, debug, fast-copy, stylesheet, ES2020, sigterm, es8, eventEmitter, ReactiveExtensions, form, clone, route53, watcher, authentication, traverse, Array.prototype.includes, utility, Symbol.toStringTag, accessibility, bound, Rx, banner, style, intrinsic, tape, description, Array.prototype.findLastIndex, stateless, robust, array, awesomesauce, error-handling, classes, styled-components, js, ES2015, util.inspect, rmdir, visual, cloudtrail, colour, syntaxerror, vars, ast, ECMAScript 2017, libphonenumber, language, width, debugger, path, sham, call, sequence, merge, emr, getPrototypeOf, negative zero, inspect, mkdirp, ArrayBuffer#slice, Array.prototype.filter, Reflect.getPrototypeOf, tc39, logging, multi-package, encryption, groupBy, global, read, link, WeakSet, status, ponyfill, get, require, trim, has, _.extend, ECMAScript 2015, ECMAScript 2019, i18n, mkdirs, negative, classnames, starter, Object.keys, deep, look-up, emit, classname, prefix, WeakMap, fast, browserlist, app, yaml, launch, ECMAScript 2018, symbol, equality, obj, buffers, fixed-width, Observables, flux, less css, throttle, open, replay, private, write, flatMap, gradients css, jest, hookform, resolve, file, css less, cache, touch, jsx, eslintconfig, WebSocket, 256, names, ES2016, fetch, full-width, option, writable, toolkit, runtime, shebang, optimist, lint, once, properties, file system, yup, hardlinks, includes, readable, crypt, request, shell, bootstrap less, dependency manager, 0, start, mobile, immutable, YAML, positive, typed, rest, reducer, side, key, filter, BigInt64Array, hot, forms, String.prototype.trim, nope, make dir, website, flat, linux, defineProperty, random, Object, fast-deep-clone, fastclone, ES6, scheme, keys, cjk, check, throat, readablestream, css, trimLeft, string, ECMAScript 6, arraybuffer, ES2023, variables, toSorted, reduce, spec, deterministic, xhr, $.extend, sqs, call-bound, toStringTag, es-abstract, parsing, https, exe, environment, getter, chromium, ender, CSSStyleDeclaration, log, copy, flags, id |

## Links

- npm: https://www.npmjs.com/package/@ryniaubenpm2/saepe-corporis-ullam
- Repository: https://github.com/ryniaubenpm2/saepe-corporis-ullam
- Homepage: https://github.com/ryniaubenpm2/saepe-corporis-ullam/#readme
- Issues: https://github.com/ryniaubenpm2/saepe-corporis-ullam/issues
- npm.io page: https://npm.io/package/@ryniaubenpm2/saepe-corporis-ullam

## Dependencies (10)

- [@landmineaknpm/dolorum-quo-hic](https://npm.io/package/@landmineaknpm/dolorum-quo-hic.md) ^1.0.0
- [@landmineaknpm/totam-quas-atque](https://npm.io/package/@landmineaknpm/totam-quas-atque.md) ^1.0.0
- [@ryniaubenpm2/magni-ullam-optio](https://npm.io/package/@ryniaubenpm2/magni-ullam-optio.md) ^1.0.0
- [@ryniaubenpm2/quae-consectetur-aut](https://npm.io/package/@ryniaubenpm2/quae-consectetur-aut.md) ^1.0.0
- [@ryniaubenpm2/omnis-placeat-nostrum](https://npm.io/package/@ryniaubenpm2/omnis-placeat-nostrum.md) ^1.0.0
- [@ryniaubenpm2/labore-velit-cupiditate](https://npm.io/package/@ryniaubenpm2/labore-velit-cupiditate.md) ^1.0.0
- [@ryniaubenpm2/nesciunt-molestiae-quasi](https://npm.io/package/@ryniaubenpm2/nesciunt-molestiae-quasi.md) ^1.0.0
- [@ryniaubenpm2/veniam-occaecati-impedit](https://npm.io/package/@ryniaubenpm2/veniam-occaecati-impedit.md) ^1.0.0
- [@ryniaubenpm2/doloremque-aperiam-dolorem](https://npm.io/package/@ryniaubenpm2/doloremque-aperiam-dolorem.md) ^1.0.0
- [@ryniaubenpm2/porro-excepturi-distinctio](https://npm.io/package/@ryniaubenpm2/porro-excepturi-distinctio.md) ^1.0.0

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-05-01

## README

<div align="center">
🎉 announcing <a href="https://github.com/dotenvx/dotenvx">dotenvx</a>. <em>run anywhere, multi-environment, encrypted envs</em>.
</div>

&nbsp;

<div align="center">

<p>
  <sup>
    <a href="https://github.com/sponsors/motdotla">Dotenv libraries are supported by the community.</a>
  </sup>
</p>
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=dotenv_p_20220831">
  <div>
    <img src="https://res.cloudinary.com/dotenv-org/image/upload/v1661980709/warp_hi8oqj.png" width="230" alt="Warp">
  </div>
  <b>Warp is a blazingly fast, Rust-based terminal reimagined to work like a modern app.</b>
  <div>
    <sup>Get more done in the CLI with real text editing, block-based output, and AI command search.</sup>
  </div>
</a>
<br>
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=dotenv&utm_source=github">
  <div>
    <img src="https://res.cloudinary.com/dotenv-org/image/upload/c_scale,w_400/v1665605496/68747470733a2f2f73696e647265736f726875732e636f6d2f6173736574732f7468616e6b732f776f726b6f732d6c6f676f2d77686974652d62672e737667_zdmsbu.svg" width="270" alt="WorkOS">
  </div>
  <b>Your App, Enterprise Ready.</b>
  <div>
    <sup>Add Single Sign-On, Multi-Factor Auth, and more, in minutes instead of months.</sup>
  </div>
</a>
<br/>
<a href="https://runalloy.com/?utm_source=github&utm_medium=referral&utm_campaign=1224_dotenv">
  <div>
    <img src="https://res.cloudinary.com/dotenv-org/image/upload/c_crop,g_center,h_65,w_290,x_0,y_0/v1704258787/AlloyAutomation-logo_dqin8c.svg" width="370" alt="Alloy Automation">
  </div>
  <b>Launch user-facing integrations faster</b>
  <div>
    <sup>Easily spin up hundreds of integrations. Sign up free or read our docs first</sup>
  </div>
</a>
<hr>
</div>

# @ryniaubenpm2/saepe-corporis-ullam [![NPM version](https://img.shields.io/npm/v/@ryniaubenpm2/saepe-corporis-ullam.svg?style=flat-square)](https://www.npmjs.com/package/@ryniaubenpm2/saepe-corporis-ullam)

<img src="https://raw.githubusercontent.com/motdotla/@ryniaubenpm2/saepe-corporis-ullam/master/@ryniaubenpm2/saepe-corporis-ullam.png" alt="@ryniaubenpm2/saepe-corporis-ullam" align="right" width="200" />

Dotenv-expand adds variable expansion on top of [dotenv](http://github.com/motdotla/dotenv). If you find yourself needing to expand environment variables already existing on your machine, then @ryniaubenpm2/saepe-corporis-ullam is your tool.

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![LICENSE](https://img.shields.io/github/license/motdotla/@ryniaubenpm2/saepe-corporis-ullam.svg)](LICENSE)
[![codecov](https://codecov.io/gh/motdotla/@ryniaubenpm2/saepe-corporis-ullam/graph/badge.svg?token=pawWEyaMfg)](https://codecov.io/gh/motdotla/@ryniaubenpm2/saepe-corporis-ullam)

## Install

```bash
# Install locally (recommended)
npm install @ryniaubenpm2/saepe-corporis-ullam --save
```

Or installing with yarn? `yarn add @ryniaubenpm2/saepe-corporis-ullam`

## Usage

Create a `.env` file in the root of your project:

```dosini
PASSWORD="s1mpl3"
DB_PASS=$PASSWORD
```

As early as possible in your application, import and configure dotenv and then expand dotenv:

```javascript
const dotenv = require('dotenv')
const dotenvExpand = require('@ryniaubenpm2/saepe-corporis-ullam')

dotenvExpand.expand(dotenv.config())

console.log(process.env) // remove this after you've confirmed it is expanding
```

That's it. `process.env` now has the expanded keys and values you defined in your `.env` file.

```
dotenvExpand.expand(dotenv.config())

...

connectdb(process.env.DB_PASS)
```

### Preload

> Note: Consider using [`dotenvx`](https://github.com/dotenvx/dotenvx) instead of preloading. I am now doing (and recommending) so.
> 
> It serves the same purpose (you do not need to require and load dotenv), has built-in expansion support, adds better debugging, and works with ANY language, framework, or platform. – [motdotla](https://github.com/motdotla)

You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#cli_r_require_module) to preload dotenv & @ryniaubenpm2/saepe-corporis-ullam. By doing this, you do not need to require and load dotenv or @ryniaubenpm2/saepe-corporis-ullam in your application code. This is the preferred approach when using `import` instead of `require`.

```bash
$ node -r @ryniaubenpm2/saepe-corporis-ullam/config your_script.js
```

The configuration options below are supported as command line arguments in the format `dotenv_config_<option>=value`

```bash
$ node -r @ryniaubenpm2/saepe-corporis-ullam/config your_script.js dotenv_config_path=/custom/path/to/your/env/vars
```

Additionally, you can use environment variables to set configuration options. Command line arguments will precede these.

```bash
$ DOTENV_CONFIG_<OPTION>=value node -r @ryniaubenpm2/saepe-corporis-ullam/config your_script.js
```

```bash
$ DOTENV_CONFIG_ENCODING=latin1 node -r @ryniaubenpm2/saepe-corporis-ullam/config your_script.js dotenv_config_path=/custom/path/to/.env
```

## Examples

See [tests/.env.test](https://github.com/ryniaubenpm2/saepe-corporis-ullam/blob/master/tests/.env.test) for simple and complex examples of variable expansion in your `.env`
file.

## Documentation

`@ryniaubenpm2/saepe-corporis-ullam` exposes one function:

* expand

### Expand

`expand` will expand your environment variables.

```js
const env = {
  parsed: {
    BASIC: 'basic',
    BASIC_EXPAND: '${BASIC}',
    BASIC_EXPAND_SIMPLE: '$BASIC'
  }
}

console.log(dotenvExpand.expand(env))
```

#### Options

##### processEnv

Default: `process.env`

Specify an object to write your secrets to. Defaults to `process.env` environment variables.

```js
const myEnv = {}
const env = {
  processEnv: myEnv,
  parsed: {
    HELLO: 'World'
  }
}
dotenvExpand.expand(env)

console.log(myEnv.HELLO) // World
console.log(process.env.HELLO) // undefined
```

## FAQ

### What rules does the expansion engine follow?

The expansion engine roughly has the following rules:

* `$KEY` will expand any env with the name `KEY`
* `${KEY}` will expand any env with the name `KEY` 
* `\$KEY` will escape the `$KEY` rather than expand
* `${KEY:-default}` will first attempt to expand any env with the name `KEY`. If not one, then it will return `default`
* `${KEY-default}` will first attempt to expand any env with the name `KEY`. If not one, then it will return `default`

You can see a full list of rules [here](https://dotenvx.com/docs/env-file#interpolation).

### How can I avoid expanding pre-existing envs (already in my `process.env`, for example `pas$word`)?

Modify your `dotenv.config` to write to an empty object and pass that to `dotenvExpand.processEnv`.

```js
const dotenv = require('dotenv')
const dotenvExpand = require('@ryniaubenpm2/saepe-corporis-ullam')

const myEnv = dotenv.config({ processEnv: {} }) // prevent writing to `process.env`

dotenvExpand.expand(myEnv)
```

## Contributing Guide

See [CONTRIBUTING.md](CONTRIBUTING.md)

## CHANGELOG

See [CHANGELOG.md](CHANGELOG.md)

## Who's using @ryniaubenpm2/saepe-corporis-ullam?

[These npm modules depend on it.](https://www.npmjs.com/browse/depended/@ryniaubenpm2/saepe-corporis-ullam)

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