Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adonisjs/fold
/ functions
Functions
100 in github.com/adonisjs/fold
⨍
Functions
100
◇
Types & classes
99
↓ 140 callers
Method
make
(value: string)
tests/container/swap.spec.ts:232
↓ 48 callers
Method
bind
( binding: Binding, resolver: BindingResolver< KnownBindings, Binding extends AbstractCons
src/container.ts:350
↓ 44 callers
Method
call
* Call a method on an object by injecting its dependencies. The method * dependencies are resolved in the same manner as a class constructor * d
src/container.ts:258
↓ 37 callers
Method
bindValue
( binding: Binding, value: Binding extends AbstractConstructor<infer A> ? A : Binding exte
src/container.ts:400
↓ 28 callers
Function
inject
()
src/decorators/inject.ts:127
↓ 27 callers
Method
hasBinding
(binding: BindingKey)
src/container.ts:180
↓ 27 callers
Method
singleton
( binding: Binding, resolver: BindingResolver< KnownBindings, Binding extends AbstractCons
src/container.ts:456
↓ 26 callers
Method
createResolver
* Create a container resolver to resolve bindings, or make classes. * * ```ts * const resolver = container.createResolver() * await resolv
src/container.ts:152
↓ 21 callers
Method
make
(value: string)
tests/container/make_class_via_inject.spec.ts:474
↓ 20 callers
Method
alias
* Register an alias for a binding. The value can be a reference * to an existing binding or to a class constructor that will * instantiate to th
src/container.ts:281
↓ 16 callers
Method
make
( binding: Binding, runtimeValues?: any[], createError?: ErrorCreator )
src/container.ts:234
↓ 15 callers
Function
enqueue
(callback: Function)
src/utils.ts:67
↓ 15 callers
Method
get
()
tests/container/swap.spec.ts:21
↓ 13 callers
Function
moduleExpression
(expression: string, parentURL: URL | string)
src/module_expression.ts:52
↓ 11 callers
Method
resolving
( binding: Binding, callback: Binding extends AbstractConstructor<infer A> ? HookCallback<KnownB
src/container.ts:583
↓ 10 callers
Method
hasAllBindings
(bindings: BindingKey[])
src/container.ts:200
↓ 10 callers
Function
moduleImporter
( importFn: () => Promise<{ default: Constructor<any> }>, method: string )
src/module_importer.ts:58
↓ 10 callers
Method
swap
* Define a fake implementation for a binding or a class constructor. * Swaps have the highest priority when resolving dependencies * from the co
src/container.ts:491
↓ 9 callers
Function
parseBindingReference
( binding: string | [LazyImport<Constructor<any>> | Constructor<any>, any?] )
src/parse_binding_reference.ts:53
↓ 8 callers
Function
containerProvider
( binding: InspectableConstructor, property: string | symbol | number, resolver: ContainerResolver<any>,
src/provider.ts:37
↓ 8 callers
Method
handle
(args: string[])
tests/module_caller/to_callable.spec.ts:24
↓ 8 callers
Function
isClass
(value: unknown)
src/utils.ts:28
↓ 6 callers
Method
#emit
* Notify emitter about binding resolution * * @param binding - The binding key that was resolved * @param value - The resolved value
src/resolver.ts:213
↓ 6 callers
Function
moduleCaller
(target: Constructor<any>, method: string)
src/module_caller.ts:46
↓ 6 callers
Method
provide
* Provide a resolver to resolve the parent dependency * * @param resolver - Factory function that returns the contextual implementation *
src/contextual_bindings_builder.ts:86
↓ 6 callers
Method
when
* Create a contextual builder to define contextual bindings. * Contextual bindings allow you to specify different implementations * for a depend
src/container.ts:616
↓ 5 callers
Method
asksFor
* Specify the binding for which to register a custom * resolver. * * @param binding - The dependency class that the parent asks for * *
src/contextual_bindings_builder.ts:66
↓ 5 callers
Method
contextualBinding
* Add a contextual binding for a given class constructor. A * contextual binding takes a parent, parent's dependency and a callback * to resolve
src/container.ts:643
↓ 5 callers
Function
firstWrapper
()
tests/enqueue.spec.ts:115
↓ 5 callers
Function
resolveDefault
(importPath: string, parentURL: URL | string)
src/utils.ts:171
↓ 5 callers
Function
secondWrapper
()
tests/enqueue.spec.ts:120
↓ 5 callers
Function
thirdWrapper
()
tests/enqueue.spec.ts:125
↓ 4 callers
Method
#execHooks
* Execute hooks for a given binding * * @param binding - The binding key * @param value - The resolved value to pass to hooks
src/resolver.ts:226
↓ 4 callers
Method
resolveFor
* Resolves binding in context of a parent. The method is same as * the "make" method, but instead takes a parent class * constructor. This is us
src/resolver.ts:484
↓ 3 callers
Method
boot
()
tests/container/bindings.spec.ts:46
↓ 2 callers
Method
#getBindingProvider
* Returns the provider for the class constructor * * @param binding - The class constructor to get the provider for
src/resolver.ts:179
↓ 2 callers
Method
handle
(args: string[])
tests/module_caller/to_handle_method.spec.ts:24
↓ 2 callers
Function
initiateContainerInjections
* Initiating the "containerInjections" property on the target, which is assumed * to be the class constructor. * * @param target - The class constr
src/decorators/inject.ts:38
↓ 2 callers
Method
restore
* Restore binding by removing its swap * * @param binding - The class constructor to restore * * @example * ```ts * container.restor
src/container.ts:515
↓ 2 callers
Method
restoreAll
* Restore mentioned or all bindings by removing their swaps * * @param bindings - Optional array of class constructors to restore. If not provid
src/container.ts:535
↓ 1 callers
Method
#getBindingResolver
* Returns the binding resolver for a parent and a binding. Returns * undefined when no contextual binding exists * * @param parent - The pare
src/resolver.ts:190
↓ 1 callers
Method
#invalidBindingException
* Constructs exception for invalid binding value * * @param parent - The parent class that requested the binding * @param binding - The inval
src/resolver.ts:139
↓ 1 callers
Method
#missingDependenciesException
* Constructs exception for binding with missing dependencies * * @param parent - The parent class that requested the binding * @param binding
src/resolver.ts:160
↓ 1 callers
Function
createDebuggingError
* Creating a debugging error that points to the source * using the @inject decorator * * @param original - The original error to extract stack trac
src/decorators/inject.ts:22
↓ 1 callers
Function
defineConstructorInjections
* Defining the injections for the constructor of the class using * reflection * * @param target - The class constructor to define injections for *
src/decorators/inject.ts:57
↓ 1 callers
Function
defineMethodInjections
* Defining the injections for the class instance method * * @param target - The class prototype * @param method - The method name to define injecti
src/decorators/inject.ts:81
↓ 1 callers
Method
find
()
benchmarks/services/users.ts:2
↓ 1 callers
Method
hasBinding
(binding: BindingKey)
src/resolver.ts:442
↓ 1 callers
Function
inline
(resolver: Container<any>)
benchmarks/module_expression.ts:42
↓ 1 callers
Function
inline
(resolver: Container<any>)
benchmarks/module_importer.ts:43
↓ 1 callers
Function
native
(resolver: Container<any>)
benchmarks/module_expression.ts:33
↓ 1 callers
Function
native
(resolver: Container<any>)
benchmarks/module_importer.ts:34
↓ 1 callers
Function
rejectPromises
* Reject pending queue promises
src/utils.ts:103
↓ 1 callers
Function
resolvePromises
* Resolve pending queue promises
src/utils.ts:92
↓ 1 callers
Function
runAsAsync
* Runs a function inside an async function. This ensures that synchronous * errors are handled in the same way a rejected promise is handled * * @p
src/utils.ts:39
↓ 1 callers
Method
useEmitter
* Define an emitter instance to use for container events * * @param emitter - Event emitter instance that implements emit method * * @exam
src/container.ts:129
Method
#resolveFor
* Resolves binding in context of a parent. The method is same as * the "make" method, but instead takes a parent class * constructor. * *
src/resolver.ts:247
Function
HomeController
()
tests/parse_binding_reference.spec.ts:46
Method
bar
(emitter: Emitter)
tests/container/make_class_via_inject.spec.ts:171
Method
bindValue
( binding: Binding, value: Binding extends AbstractConstructor<infer A> ? A : Binding exte
src/resolver.ts:630
Method
call
* Call a method on an object by injecting its dependencies. The method * dependencies are resolved in the same manner as a class constructor * d
src/resolver.ts:566
Method
constructor
* Initialize the container resolver with container bindings and options * * @param container - Object containing all container bindings, values,
src/resolver.ts:111
Method
constructor
* Initialize the contextual bindings builder * * @param parent - The parent class constructor for the contextual binding * @param container -
src/contextual_bindings_builder.ts:47
Method
constructor
* Initialize the container with optional configuration * * @param options - Optional container configuration including event emitter * * @
src/container.ts:114
Method
constructor
()
tests/container/swap.spec.ts:30
Method
constructor
(public db: Database)
tests/container/known_make_class.spec.ts:143
Method
constructor
(public db: Database)
tests/container/make_class.spec.ts:142
Method
constructor
(public db: Database)
tests/container/make_class_via_inject.spec.ts:24
Method
constructor
(public config: Config)
tests/container/make_class_via_inject.spec.ts:57
Method
constructor
(public db: Database)
tests/container/make_class_via_inject.spec.ts:108
Method
constructor
(public hash: Hash)
tests/container/make_class_via_inject.spec.ts:295
Method
find
(encryption: Encryption)
tests/container/make_class_via_inject.spec.ts:88
Method
find
()
benchmarks/services/comments.ts:2
Method
find
()
benchmarks/services/thread.ts:2
Method
find
()
benchmarks/services/posts.ts:2
Function
foo
()
tests/container/known_make_class.spec.ts:78
Function
foo
()
tests/container/make_class.spec.ts:78
Method
foo
()
tests/container/call_method.spec.ts:74
Method
foo
(db: Database)
tests/container/make_class_via_inject.spec.ts:164
Method
get
()
tests/container/swap.spec.ts:39
Function
handle
(...args: Args)
src/module_caller.ts:133
Function
handle
(...args: Args)
src/module_expression.ts:177
Function
handle
(...args: Args)
src/module_importer.ts:160
Method
hasAllBindings
(bindings: BindingKey[])
src/resolver.ts:465
Function
injectDecorator
(target: any, propertyKey?: string | symbol)
src/decorators/inject.ts:137
Method
make
( binding: Binding, runtimeValues?: any[], createError?: ErrorCreator )
src/resolver.ts:535
Method
make
(_: string)
tests/container/swap.spec.ts:238
Method
make
(value: string)
tests/container/make_class_via_inject.spec.ts:299
Method
make
(value: string)
tests/container/make_class_via_inject.spec.ts:331
Method
make
(value: string)
tests/container/make_class_via_inject.spec.ts:396
Method
makeUrl
()
tests/container/known_bindings.spec.ts:259
Function
parse
* Parses a module expression to extract the module import path * and the method to call on the default exported class. * * ```ts *
src/module_expression.ts:69
Method
show
(user: UserService)
tests/container/swap.spec.ts:33
Method
store
()
tests/resolver.spec.ts:88
Function
toCallable
* Converts the class reference to a callable function. Invoking this method * internally creates a new instance of the class using the container
src/module_caller.ts:76
Function
toCallable
* Converts the module expression to a callable function. Invoking this * method run internally import the module, create a new instance of the
src/module_expression.ts:108
Function
toCallable
* Converts the module import function to a callable function. Invoking this * method run internally import the module, create a new instance of t
src/module_importer.ts:92
Function
toHandleMethod
* Converts the class reference to an object with handle method. Invoking this * method internally creates a new instance of the class using the c
src/module_caller.ts:126
Function
toHandleMethod
* Converts the module expression to an object with handle method. Invoking the * handle method run internally imports the module, create a new in
src/module_expression.ts:168
Function
toHandleMethod
* Converts the module import function to an object with handle method. Invoking the * handle method run internally imports the module, create a n
src/module_importer.ts:151