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 of a PPPropertyFilter
Signature
export declare const make: (params: MTypes.Data<Type>) => Type
merge
Creates a new PPPropertyFilter by composing several existing PPPropertyFilter’s in sequence. The resulting PPPropertyFilter removes any value that is removed by at least one of the composed PPPropertyFilter’s.
Signature
export declare const merge: ({ id, filters }: { readonly id: string; readonly filters: ReadonlyArray<Type> }) => Type
removeNotFulfillingKeyPredicateMaker
Constructor of a PPPropertyFilter 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
Equivalences
equivalence
Equivalence of PPPropertyFilter’s
Signature
export declare const equivalence: Equivalence.Equivalence<Type>
Getters
action
Returns the action property of self
Signature
export declare const action: MTypes.OneArgFunction<Type, MTypes.OneArgFunction<PPValues.Type, PPValues.Type>>
id
Returns the id property of self
Signature
export declare const id: MTypes.OneArgFunction<Type, string>
Instances
none
PPPropertyFilter instance that removes no properties
Signature
export declare const none: Type
removeEnumerables
PPPropertyFilter instance that removes enumerable properties of non-primitive values
Signature
export declare const removeEnumerables: Type
removeFunctions
PPPropertyFilter instance that removes properties of non-primitive values whose value is a function
Signature
export declare const removeFunctions: Type
removeNonEnumerables
PPPropertyFilter instance that removes non-enumerable properties of non-primitive values
Signature
export declare const removeNonEnumerables: Type
removeNonFunctions
PPPropertyFilter instance that removes properties of non-primitive values whose value is not a function
Signature
export declare const removeNonFunctions: Type
removeStringKeys
PPPropertyFilter instance that removes properties of non-primitive values with a string key
Signature
export declare const removeStringKeys: Type
removeSymbolicKeys
PPPropertyFilter instance that removes properties of non-primitive values with a symbolic key
Signature
export declare const removeSymbolicKeys: Type
Models
Type (class)
Type that represents a PPPropertyFilter
Signature
export declare class Type {
constructor({ id, action }: MTypes.Data<Type>)
}
[MData.idSymbol] (method)
Returns the id of this
Signature
[MData.idSymbol](): string | (() => string)
[Hash.symbol] (method)
Calculates the hash value of this
Signature
[Hash.symbol](): number
[MEquivalenceBasedEqualityData.isEquivalentToSymbol] (method)
Function that implements the equivalence of this and that
Signature
[MEquivalenceBasedEqualityData.isEquivalentToSymbol](this: this, that: this): boolean
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol] (method)
Predicate that returns true if that has the same type marker as this
Signature
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol](that: unknown): boolean
id (property)
Id of this PropertyFilter instance. Useful for equality and debugging
Signature
readonly id: string
action (property)
Action of this PropertyFilter instance
Signature
readonly action: MTypes.OneArgFunction<PPValues.Type, PPValues.Type>
Module markers
moduleTag
Module tag
Signature
export declare const moduleTag: "@parischap/pretty-print/Parameters/PropertyFilter/"