Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Anexsoft/Design-Patterns-TypeScript
/ functions
Functions
88 in github.com/Anexsoft/Design-Patterns-TypeScript
⨍
Functions
88
◇
Types & classes
97
↓ 7 callers
Method
calculate
(input: number)
structural/decorator/src/interfaces/discount.interface.ts:2
↓ 7 callers
Method
getConnector
()
creational/abstract-factory/src/abstract-factory.interface.ts:5
↓ 5 callers
Method
setSpecialPrice
(input: number)
structural/decorator/src/product.ts:10
↓ 4 callers
Method
add
(item: CartItem)
behaviour/observer/src/shopping-cart.ts:35
↓ 4 callers
Method
getPlayList
(code: string)
structural/proxy/src/video-provider.interface.ts:2
↓ 4 callers
Method
getPublisher
(connector: IConnector)
creational/abstract-factory/src/abstract-factory.interface.ts:6
↓ 4 callers
Method
setStrategy
(context: PaymentStrategy)
behaviour/strategy/src/checkout.ts:6
↓ 3 callers
Method
create
()
creational/factory/order.ts:13
↓ 3 callers
Method
execute
(userId: string, amount: number)
behaviour/strategy/src/interfaces/payment-strategy.interface.ts:7
↓ 3 callers
Method
send
(factory: IAbstractFactory)
creational/abstract-factory/src/publisher.ts:6
↓ 2 callers
Method
getInstance
()
creational/singleton/my-configuration.ts:18
↓ 2 callers
Function
getPlayList
()
structural/proxy/index.ts:14
↓ 2 callers
Method
handle
()
behaviour/command/src/command.interface.ts:3
↓ 2 callers
Method
post
(title: string, message: string)
structural/adapter/src/providers/notification.interface.ts:2
↓ 2 callers
Method
purchase
()
behaviour/observer/src/shopping-cart.ts:45
↓ 1 callers
Method
close
()
creational/abstract-factory/src/factories/connector.interface.ts:3
↓ 1 callers
Method
createPaymentType
(type: PaymentType)
creational/factory/src/payment-method-factory.ts:8
↓ 1 callers
Method
forceToProcess
(commands: ICommand[])
behaviour/command/src/payment-method.handler.ts:9
↓ 1 callers
Method
initialize
()
creational/singleton/my-configuration.ts:12
↓ 1 callers
Method
open
()
creational/abstract-factory/src/factories/connector.interface.ts:2
↓ 1 callers
Method
process
(command: ICommand)
behaviour/command/src/payment-method.handler.ts:4
↓ 1 callers
Method
publish
(content: string)
creational/abstract-factory/src/factories/publisher.interface.ts:2
↓ 1 callers
Method
send
(channelId: string, title: string, message: string)
structural/adapter/src/providers/slack-notification.ts:2
↓ 1 callers
Method
update
(subject: any)
behaviour/observer/src/impl/observer.interface.ts:2
Method
apiUrl
()
creational/singleton/my-configuration.ts:35
Function
attach
(observer: Observer)
behaviour/observer/src/impl/subject.abstract.ts:6
Method
calculate
(input: number)
structural/decorator/src/base-price.ts:4
Method
calculate
(input: number)
structural/decorator/src/decorators/special-price.decorator.ts:8
Method
calculate
(input: number)
structural/decorator/src/decorators/vip-customer.decorator.ts:8
Method
close
()
creational/abstract-factory/src/factories/linkedin/linkedin-connector.ts:8
Method
close
()
creational/abstract-factory/src/factories/facebook/facebook-connector.ts:8
Method
close
()
creational/abstract-factory/src/factories/slack/slack-connector.ts:8
Method
comission
()
creational/factory/src/types/Visa.ts:4
Method
comission
()
creational/factory/src/types/PayPal.ts:4
Method
comission
()
creational/factory/src/types/MasterCard.ts:4
Method
connectionString
()
creational/singleton/my-configuration.ts:27
Method
constructor
( public name: string, public isFirstBuy: boolean, public type: string )
structural/decorator/src/customer.ts:2
Method
constructor
( public name: string, public price: number )
structural/decorator/src/product.ts:5
Method
constructor
(private readonly decorator: IDiscount)
structural/decorator/src/decorators/special-price.decorator.ts:4
Method
constructor
(private readonly decorator: IDiscount)
structural/decorator/src/decorators/vip-customer.decorator.ts:4
Method
constructor
(private readonly provider: IVideoProvider)
structural/proxy/src/video.proxy.ts:6
Method
constructor
(private slackNotification: SlackNotification)
structural/adapter/src/providers/slack-adapter-notification.ts:5
Method
constructor
(private providers: INotification[])
structural/adapter/src/services/notification.service.ts:4
Method
constructor
(public cardNumber: string, public cvv: string)
behaviour/strategy/src/mastercard.strategy.ts:5
Method
constructor
(public cardNumber: string, public cvv: string)
behaviour/strategy/src/visa.strategy.ts:5
Method
constructor
(public userEmail: string)
behaviour/strategy/src/paypal.strategy.ts:5
Method
constructor
(private readonly creditCardDef: CreditCardDto)
behaviour/command/src/payment-commands/payu.command.ts:7
Method
constructor
(private readonly creditCardDef: CreditCardDto)
behaviour/command/src/payment-commands/culqui.command.ts:7
Method
constructor
(private readonly creditCardDef: CreditCardDto)
behaviour/command/src/payment-commands/mercadopago.command.ts:7
Method
constructor
( private readonly cardtype: CreditCardType, private readonly cardCustomerFullName: string,
behaviour/command/src/payment-commands/dto/credit-card.dto.ts:4
Method
constructor
( public id: number, public name: string, public quantity: number, public unit
behaviour/observer/src/shopping-cart.ts:6
Method
constructor
( public readonly userId: number, public readonly userFirstName: string, public readon
behaviour/observer/src/shopping-cart.ts:17
Method
constructor
(private userId: number, private userFirstName: string)
behaviour/observer/src/shopping-cart.ts:29
Method
constructor
( private type: PaymentType, public amount: number)
creational/factory/order.ts:9
Method
constructor
(private content: string)
creational/abstract-factory/src/publisher.ts:4
Method
constructor
(private connector: IConnector)
creational/abstract-factory/src/factories/linkedin/linkedin-publisher.ts:5
Method
constructor
(private connector: IConnector)
creational/abstract-factory/src/factories/facebook/facebook-publisher.ts:5
Method
constructor
(private connector: IConnector)
creational/abstract-factory/src/factories/slack/slack-publisher.ts:5
Method
constructor
()
creational/singleton/my-configuration.ts:10
Function
detach
(observer: Observer)
behaviour/observer/src/impl/subject.abstract.ts:14
Method
enviroment
()
creational/singleton/my-configuration.ts:31
Method
execute
(userId: string, amount: number)
behaviour/strategy/src/mastercard.strategy.ts:7
Method
execute
(userId: string, amount: number)
behaviour/strategy/src/visa.strategy.ts:7
Method
execute
(userId: string, amount: number)
behaviour/strategy/src/paypal.strategy.ts:7
Method
execute
(userId: string, amount: number)
behaviour/strategy/src/checkout.ts:10
Method
getConnector
()
creational/abstract-factory/src/factories/linkedin/linkedin-factory.ts:8
Method
getConnector
()
creational/abstract-factory/src/factories/facebook/facebook-factory.ts:8
Method
getConnector
()
creational/abstract-factory/src/factories/slack/slack-factory.ts:8
Method
getPlayList
(code: string)
structural/proxy/src/youtube.api.ts:12
Method
getPlayList
(code: string)
structural/proxy/src/video.proxy.ts:8
Method
getPublisher
(connector: IConnector)
creational/abstract-factory/src/factories/linkedin/linkedin-factory.ts:12
Method
getPublisher
(connector: IConnector)
creational/abstract-factory/src/factories/facebook/facebook-factory.ts:12
Method
getPublisher
(connector: IConnector)
creational/abstract-factory/src/factories/slack/slack-factory.ts:12
Method
handle
()
behaviour/command/src/payment-commands/payu.command.ts:9
Method
handle
()
behaviour/command/src/payment-commands/culqui.command.ts:9
Method
handle
()
behaviour/command/src/payment-commands/mercadopago.command.ts:9
Function
notify
(message: any)
behaviour/observer/src/impl/subject.abstract.ts:18
Method
open
()
creational/abstract-factory/src/factories/linkedin/linkedin-connector.ts:4
Method
open
()
creational/abstract-factory/src/factories/facebook/facebook-connector.ts:4
Method
open
()
creational/abstract-factory/src/factories/slack/slack-connector.ts:4
Method
post
(title: string, message: string)
structural/adapter/src/providers/slack-adapter-notification.ts:7
Method
post
(title: string, message: string)
structural/adapter/src/providers/facebook-notification.ts:4
Method
post
(title: string, message: string)
structural/adapter/src/services/notification.service.ts:6
Method
publish
(content: string)
creational/abstract-factory/src/factories/linkedin/linkedin-publisher.ts:7
Method
publish
(content: string)
creational/abstract-factory/src/factories/facebook/facebook-publisher.ts:7
Method
publish
(content: string)
creational/abstract-factory/src/factories/slack/slack-publisher.ts:7
Method
update
(message: Order)
behaviour/observer/src/observers/sms.observer.ts:5
Method
update
(message: Order)
behaviour/observer/src/observers/email.observer.ts:5