npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ryniaubenpm2/saepe-corporis-ullam

v1.0.0

Published

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

Downloads

1

Maintainers

mi762136mi762136

Keywords

enumerableavacurlrecursiveinstallqsfastifyreact-hooksless compilerObject.assigncode pointscallbackswfeslint-pluginelbendpointmrusearchRxJSnodebundlinginternal slotES2022serializehasOwnPropertyUint8ClampedArraymixinsjQueryStreamsUint16ArrayinterruptsprettyiteratorwalkwatchFileelmfindups3consoledeepclonetypesafeuninstallajvsetpostcss[[Prototype]]UnderscoreECMAScript 2020execES2021sigintgetoptes5reusevalueprivate datahasOwnbcryptsesqueueweaksetjwtcensorstylingbytesignalsbyteLengthStyleSheetpackagetoobjectsafeArrayrestfuluuiditerationtelephonevestURLSearchParamsamazonArray.prototype.findLastsuperstructspinnertypeofimmerenvpropertyspeeddeep-copyoperating-systemtextgdprdotenvstatestyleguidetslibworkerfromeast-asian-widthchrometerminalpolyfilllesscsscompile lesstostringtagjsdiffpipedescriptorObservableReactiveXl10npicomatchwordbreakparsesinatrashrinkwrapkoreancommand-linesameValueZerosuperagentTypeScriptremoveIteratorlasttypescryptoomitprotoemojies-shimsentriesbyteOffsetredactwhichESformattingchildObject.isECMAScript 5urlproxywordwrapdefineglobalsinferencebeanstalkrangeerrorES2018promisesFunction.prototype.namehelperssharedbundlerglaciertypeloadingsettercommanderdeepcopywindowsfolderpreprocessorpluginrfc4122bindefficientfscoreisConcatSpreadablewalkingmimetypesextracss variableratevpcchaiautoprefixerpasswordauthgroupautoscalingpredictablecolumnsexpressionreact-testing-librarypatchregexpstringifyserializer@@toStringTagpruneargparserm -frMicrosoftfastcopysyntaxregular expressionseventDispatcherutillimitedshimstdlibpackagesvariables in cssjsonmovediffimportexportvalidationweakmapawaitES2017hooksbreakcompilerAsyncIteratorurlsisECMAScript 2022package managerless.jsreactownsharedarraybufferBigUint64Arraydropbrowserslistchinesepersistentreact-hook-formprototypefunctionses2016processfullmapreducees2018postcss-pluginidentifiersio-tslockfilecloudformationless mixinsexithas-ownhandlersdom-testing-librarymiddlewaremimemonorepoWebSocketsstylesform-validationesperformanceliveextendtoArraystreammodulesdataViewobjecttypedarraysconsumexdgInt32ArraylinewrapmatchestaketrimStartrmec2kinesisscheme-validationwatchstableconfigurablestreamsnumberttysymlinkscharactermime-dbminimalartcollectionstoragegatewaybluebirdstreams2expressArray.prototype.flattensortedtestingtrimRightlruargsassertioncircularFloat64Arraypnpm9Int8ArraytddlimitsetPrototypeOflookcss-in-jsECMAScript 2021assertspyyamljsdomfseventsaccessorrapidzodfullwidthdirectoryratelimitjasminewatchingserializationdateargvtermRFC-6455Object.definePropertyargumentsES7call-bindconfigcommandapiprotocol-buffersSymbolschemaclass-validatorlazyinputfunctionjsonpathiterateduplexxtermmacosfindLastIndexexit-codewhatwgjshintbootstrap csstypedarrayinvariantfind-upPromiseescapeFloat32ArrayArray.prototype.flatMapansixdg-openawsvalidnamecompareinstallerexecutableregularagentmochamatchdynamodbcss nestinggenericsECMAScript 7signalbusyreal-timefindLastflagdayjsdataview-0columnchannelassertparserObject.getPrototypeOfcharacterstypeerrorcloudwatchnpmroutercomputed-typesqueueMicrotasksliceerrorUint8ArraypromiseirqtoolsframeworkperformantURLvaluesbrowserrdstypanionparentsdomestreesettingslistenersasciiloggerpreserve-symlinksflattenparentObject.entriessortArray.prototype.containsPushArrayBuffer.prototype.sliceelectronunicodepropoffsetslotmapeslintmakeObject.fromEntrieseventsdeleteebsmatchAllrgbconcurrencyindicatorES2019CSSmetadatapushstructuredClone.envopenerTypedArrayjoibatchconcatTypeBoxECMAScript 2016modulewgetassignES5regular expressiondebugfast-copystylesheetES2020sigtermes8eventEmitterReactiveExtensionsformcloneroute53watcherauthenticationtraverseArray.prototype.includesutilitySymbol.toStringTagaccessibilityboundRxbannerstyleintrinsictapedescriptionArray.prototype.findLastIndexstatelessrobustarrayawesomesauceerror-handlingclassesstyled-componentsjsES2015util.inspectrmdirvisualcloudtrailcoloursyntaxerrorvarsastECMAScript 2017libphonenumberlanguagewidthdebuggerpathshamcallsequencemergeemrgetPrototypeOfnegative zeroinspectmkdirpArrayBuffer#sliceArray.prototype.filterReflect.getPrototypeOftc39loggingmulti-packageencryptiongroupByglobalreadlinkWeakSetstatusponyfillgetrequiretrimhas_.extendECMAScript 2015ECMAScript 2019i18nmkdirsnegativeclassnamesstarterObject.keysdeeplook-upemitclassnameprefixWeakMapfastbrowserlistappyamllaunchECMAScript 2018symbolequalityobjbuffersfixed-widthObservablesfluxless cssthrottleopenreplayprivatewriteflatMapgradients cssjesthookformresolvefilecss lesscachetouchjsxeslintconfigWebSocket256namesES2016fetchfull-widthoptionwritabletoolkitruntimeshebangoptimistlintoncepropertiesfile systemyuphardlinksincludesreadablecryptrequestshellbootstrap lessdependency manager0startmobileimmutableYAMLpositivetypedrestreducersidekeyfilterBigInt64ArrayhotformsString.prototype.trimnopemake dirwebsiteflatlinuxdefinePropertyrandomObjectfast-deep-clonefastcloneES6schemekeyscjkcheckthroatreadablestreamcsstrimLeftstringECMAScript 6arraybufferES2023variablestoSortedreducespecdeterministicxhr$.extendsqscall-boundtoStringTages-abstractparsinghttpsexeenvironmentgetterchromiumenderCSSStyleDeclarationlogcopyflagsid

Readme

 

@ryniaubenpm2/saepe-corporis-ullam NPM version

Dotenv-expand adds variable expansion on top of 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 LICENSE codecov

Install

# 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:

PASSWORD="s1mpl3"
DB_PASS=$PASSWORD

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

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 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

You can use the --require (-r) command line option 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.

$ 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

$ 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.

$ DOTENV_CONFIG_<OPTION>=value node -r @ryniaubenpm2/saepe-corporis-ullam/config your_script.js
$ 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 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.

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.

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.

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.

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

CHANGELOG

See CHANGELOG.md

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

These npm modules depend on it.