Skip to content

Commit

Permalink
refactor(env): rename package and function
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Oct 25, 2024
1 parent 8f1afd7 commit 6d72576
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@alwatr/get-env-value",
"name": "@alwatr/env",
"version": "1.0.0-0",
"description": "Get a value of `env ` by given key.",
"author": "S. Ali Mihandoost <[email protected]>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ __dev_mode__: packageTracer.add(__package_name__, __package_version__);
/**
* Parameters for retrieving an environment variable value.
*/
export type GetEnvValueOption = {
export type GetEnvOption = {
/**
* The name of the environment variable.
*/
Expand All @@ -26,7 +26,7 @@ export type GetEnvValueOption = {
developmentValue?: string;
}

export function getEnvValue(option: GetEnvValueOption): string {
export function getEnv(option: GetEnvOption): string {
let value = process.env[option.name];
if (value === '') value = undefined; // empty string is considered as undefined in environment variables

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/nanolib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@alwatr/fetch": "workspace:^",
"@alwatr/flat-string": "workspace:^",
"@alwatr/flatomise": "workspace:^",
"@alwatr/get-env-value": "workspace:^",
"@alwatr/get-env": "workspace:^",
"@alwatr/is-number": "workspace:^",
"@alwatr/local-storage": "workspace:^",
"@alwatr/logger": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/nanolib/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export * from '@alwatr/platform-info';
export * from '@alwatr/render-state';
export * from '@alwatr/unicode-digits';
export * from '@alwatr/resolve-url';
export * from '@alwatr/get-env-value';
export * from '@alwatr/get-env';

0 comments on commit 6d72576

Please sign in to comment.