Skip to content

Commit 105cdf2

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 4ad56f1 + e97f315 commit 105cdf2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SimpleDi is compatible with ES3 compliant browsers
1515

1616
## Api
1717

18-
### `di.register()`
18+
### `di.register(dependencyName, factoryFunction[, dependencies[, overwrite]])`
1919

2020
#### Parameters:
2121

@@ -29,7 +29,7 @@ overwrite | `boolean` | *optional* This allows to explicitly overwrite dependenc
2929
Adds a dependency to the registry.
3030
It throws an exception when a dependency with the same name already exists and overwrite true is not passed.
3131

32-
### `di.registerBulk()`
32+
### `di.registerBulk(dependencies)`
3333

3434
#### Parameters:
3535

@@ -46,13 +46,14 @@ di.registerBulk([
4646
]);
4747
```
4848

49-
### `di.get()`
49+
### `di.get(name[, arg1[, arg2[, ...]]])`
5050

5151
#### Parameters:
5252

5353
Name | Type | Description
5454
-----|------|------------
5555
dependencyName | `string` | The name of the dependency
56+
arg1, arg2, ... | `mixed` | All args defined after the name will also be injected
5657

5758
Returns a previously registered dependency and resolves all dependencies.
5859

@@ -69,15 +70,15 @@ Returns an object with numbers that state how often each dependency got resolved
6970

7071
## Built-in factory functions
7172

72-
### `SimpleDi.always()`
73+
### `SimpleDi.always(objectOrFunction)`
7374

7475
Name | Type | Description
7576
-----|------|------------
76-
objectOrFunction | `anything` | Always returns this argument
77+
objectOrFunction | `mixed` | Always returns this argument
7778

7879
A factory function that always returns the first argument when `di.get` is called.
7980

80-
### `SimpleDi.withNew()`
81+
### `SimpleDi.withNew(Constructor)`
8182

8283
Name | Type | Description
8384
-----|------|------------

0 commit comments

Comments
 (0)