mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
refactor: split api into api, api-cli & api-plugin
This commit is contained in:
@@ -29,7 +29,6 @@ export type RecursivePartial<T> = {
|
||||
|
||||
/**
|
||||
* Deletes all properties that are undefined from an object
|
||||
*
|
||||
* @param object Object to delete undefined properties from
|
||||
*/
|
||||
export function deleteUndefinedProperties(object: unknown): unknown {
|
||||
@@ -47,7 +46,7 @@ export function deleteUndefinedProperties(object: unknown): unknown {
|
||||
|
||||
const indexedObject = object as {[k: string]: unknown};
|
||||
|
||||
if (typeof indexedObject[key] === 'undefined') {
|
||||
if (indexedObject[key] === undefined) {
|
||||
// delete undefined keys
|
||||
delete indexedObject[key];
|
||||
} else {
|
||||
@@ -72,7 +71,7 @@ export function isNodeEnvironment(): boolean {
|
||||
export function isProductiveEnvironment(): boolean {
|
||||
return (
|
||||
typeof process.env === 'object' &&
|
||||
typeof process.env.NODE_ENV !== 'undefined' &&
|
||||
process.env.NODE_ENV !== undefined &&
|
||||
process.env.NODE_ENV === 'production'
|
||||
);
|
||||
}
|
||||
@@ -86,7 +85,6 @@ export function isProductiveNodeEnvironment(): boolean {
|
||||
|
||||
/**
|
||||
* Check if a transport is a verifiable transport
|
||||
*
|
||||
* @param transport Transport to check
|
||||
*/
|
||||
export function isTransportWithVerification(transport: Transport): transport is VerifiableTransport {
|
||||
|
||||
Reference in New Issue
Block a user