PropertyFilter overview
This module implements a type that takes care of filtering properties when printing non-primitive values.
With the make function, you can define your own instances if the provided ones don’t suit your needs.
Table of contents
Constructors
make
Constructor
Signature
export declare const make: ({ id, action }: { readonly id: string; readonly action: Action.Type }) => Type
removeNotFulfillingKeyPredicateMaker
Constructor of a propertyFilter instance that removes properties of non-primitive values whose key is:
- A string that does not fulfill
predicate
- A symbol
Signature
export declare const removeNotFulfillingKeyPredicateMaker: ({
id,
predicate
}: {
readonly id: string
readonly predicate: Predicate.Predicate<string>
}) => Type
Destructors
id
Returns the id
property of self
Signature
export declare const id: MTypes.OneArgFunction<Type, string>
Equivalences
equivalence
Equivalence
Signature
export declare const equivalence: Equivalence.Equivalence<Type>
Guards
has
Type guard
Signature
export declare const has: (u: unknown) => u is Type
Instances
removeEnumerables
PropertyFilter instance that removes enumerable properties of non-primitive values
Signature
export declare const removeEnumerables: Type
removeFunctions
PropertyFilter instance that removes properties of non-primitive values whose value is a function
Signature
export declare const removeFunctions: Type
removeNonEnumerables
PropertyFilter instance that removes non-enumerable properties of non-primitive values
Signature
export declare const removeNonEnumerables: Type
removeNonFunctions
PropertyFilter instance that removes properties of non-primitive values whose value is not a function
Signature
export declare const removeNonFunctions: Type
removeStringKeys
PropertyFilter instance that removes properties of non-primitive values with a string key
Signature
export declare const removeStringKeys: Type
removeSymbolicKeys
PropertyFilter instance that removes properties of non-primitive values with a symbolic key
Signature
export declare const removeSymbolicKeys: Type
Models
Action (namespace)
Namespace of a PropertyFilter used as an action
Type (interface)
Type of the action
Signature
export interface Type extends MTypes.OneArgFunction<PPValues.Type> {}
Type (interface)
Type that represents a PropertyFilter.
Signature
export interface Type extends Action.Type, Equal.Equal, MInspectable.Inspectable, Pipeable.Pipeable {
/** Id of this PropertyFilter instance. Useful for equality and debugging */
readonly id: string
/** @internal */
readonly [_TypeId]: _TypeId
}
moduleTag
Module tag
Signature
export declare const moduleTag: "@parischap/pretty-print/PropertyFilter/"