Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ditox-react

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ditox-react - npm Package Compare versions

Comparing version 1.4.2 to 2.0.0

dist/browser/index.d.ts

88

docs/README.md

@@ -47,14 +47,6 @@ ditox-react

### Hook
### Other Functions
Returns a dependency container, or `undefined` in case the container is not provided. Functions
- [useDependencyContainer](README.md#usedependencycontainer)
### Hook
Returns a dependency container. Throws an error in case the container is not provided. Functions
- [useDependencyContainer](README.md#usedependencycontainer)
## Type aliases

@@ -84,3 +76,3 @@

[DependencyContainer.tsx:19](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/DependencyContainer.tsx#L19)
[DependencyContainer.tsx:19](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/DependencyContainer.tsx#L19)

@@ -103,3 +95,3 @@ ___

| :------ | :------ |
| `binder?` | [DependencyContainerBinder](README.md#dependencycontainerbinder) |
| `binder?` | [`DependencyContainerBinder`](README.md#dependencycontainerbinder) |
| `children` | `ReactNode` |

@@ -110,3 +102,3 @@ | `root?` | `boolean` |

[DependencyContainer.tsx:26](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/DependencyContainer.tsx#L26)
[DependencyContainer.tsx:26](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/DependencyContainer.tsx#L26)

@@ -143,3 +135,3 @@ ## Component

| `params.children` | `ReactNode` | - |
| `params.module` | `ModuleDeclaration`<Module<Record<string, unknown\>\>\> | Module declaration for binding |
| `params.module` | `ModuleDeclaration`<`Module`<`Record`<`string`, `unknown`\>\>\> | Module declaration for binding |
| `params.scope?` | ``"scoped"`` \| ``"singleton"`` | Optional scope for binding: `singleton` (default) or `scoped`. |

@@ -153,3 +145,3 @@

[DependencyModule.tsx:33](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/DependencyModule.tsx#L33)
[DependencyModule.tsx:33](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/DependencyModule.tsx#L33)

@@ -197,3 +189,3 @@ ___

| :------ | :------ |
| `params` | [DependencyContainerParams](README.md#dependencycontainerparams) |
| `params` | [`DependencyContainerParams`](README.md#dependencycontainerparams) |

@@ -206,3 +198,3 @@ #### Returns

[DependencyContainer.tsx:68](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/DependencyContainer.tsx#L68)
[DependencyContainer.tsx:68](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/DependencyContainer.tsx#L68)

@@ -217,3 +209,3 @@ ___

▸ **useOptionalDependency**<T\>(`token`): `T` \| `undefined`
▸ **useOptionalDependency**<`T`\>(`token`): `T` \| `undefined`

@@ -230,3 +222,3 @@ #### Type parameters

| :------ | :------ |
| `token` | `Token`<T\> |
| `token` | `Token`<`T`\> |

@@ -239,3 +231,3 @@ #### Returns

[hooks.ts:52](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L52)
[hooks.ts:52](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/hooks.ts#L52)

@@ -250,3 +242,3 @@ ___

▸ **useDependency**<T\>(`token`): `T`
▸ **useDependency**<`T`\>(`token`): `T`

@@ -263,3 +255,3 @@ #### Type parameters

| :------ | :------ |
| `token` | `Token`<T\> |
| `token` | `Token`<`T`\> |

@@ -272,10 +264,8 @@ #### Returns

[hooks.ts:41](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L41)
[hooks.ts:41](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/hooks.ts#L41)
___
## Hook
## Other Functions
Returns a dependency container, or &#x60;undefined&#x60; in case the container is not provided. Functions
### useDependencyContainer

@@ -285,2 +275,6 @@

**`category`** Hook
Returns a dependency container. Throws an error in case the container is not provided.
#### Parameters

@@ -298,30 +292,10 @@

[hooks.ts:10](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L10)
[hooks.ts:10](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/hooks.ts#L10)
▸ **useDependencyContainer**(`mode?`): `Container` \| `undefined`
#### Parameters
**`category`** Hook
| Name | Type |
| :------ | :------ |
| `mode?` | ``"optional"`` |
Returns a dependency container, or `undefined` in case the container is not provided.
#### Returns
`Container` \| `undefined`
#### Defined in
[hooks.ts:16](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L16)
___
## Hook
Returns a dependency container. Throws an error in case the container is not provided. Functions
### useDependencyContainer
▸ **useDependencyContainer**(`mode`): `Container`
#### Parameters

@@ -331,18 +305,2 @@

| :------ | :------ |
| `mode` | ``"strict"`` |
#### Returns
`Container`
#### Defined in
[hooks.ts:10](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L10)
▸ **useDependencyContainer**(`mode?`): `Container` \| `undefined`
#### Parameters
| Name | Type |
| :------ | :------ |
| `mode?` | ``"optional"`` |

@@ -356,2 +314,2 @@

[hooks.ts:16](https://github.com/mnasyrov/ditox/blob/cb2b2da/packages/ditox-react/src/hooks.ts#L16)
[hooks.ts:16](https://github.com/mnasyrov/ditox/blob/8c2302d/packages/ditox-react/src/hooks.ts#L16)
{
"name": "ditox-react",
"version": "1.4.2",
"version": "2.0.0",
"description": "Ditox.js tooling for React.js",

@@ -29,11 +29,10 @@ "publishConfig": {

},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.module.js",
"jsnext:main": "dist/index.module.js",
"unpkg": "dist/index.umd.js",
"umd:main": "dist/index.umd.js",
"browser": "dist/index.browser.js",
"react-native": "dist/index.browser.js",
"types": "dist/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"jsnext:main": "dist/esm/index.js",
"unpkg": "dist/umd/index.js",
"umd:main": "dist/umd/index.js",
"browser": "dist/browser/index.js",
"react-native": "dist/browser/index.js",
"types": "dist/esm/index.d.ts",
"source": "src/index.ts",

@@ -44,6 +43,4 @@ "sideEffects": false,

"docs",
"lib",
"src",
"LICENSE",
"mod.ts",
"README.md"

@@ -53,7 +50,9 @@ ],

"clean": "shx rm -rf dist lib",
"build": "rollup -c",
"watch": "rollup -c --watch"
"build": "npm run build:cjs && npm run build:esm && npm run build:rollup",
"build:cjs": "tsc -p tsconfig.build.json --outDir dist/cjs --module commonjs",
"build:esm": "tsc -p tsconfig.build.json --outDir dist/esm --module es2015",
"build:rollup": "rollup -c"
},
"dependencies": {
"ditox": "1.4.2"
"ditox": "2.0.0"
},

@@ -64,10 +63,10 @@ "peerDependencies": {

"devDependencies": {
"@testing-library/react": "11.2.5",
"@testing-library/react-hooks": "5.1.1",
"@types/react": "17.0.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-test-renderer": "17.0.1"
"@testing-library/react": "12.1.2",
"@testing-library/react-hooks": "7.0.2",
"@types/react": "17.0.38",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-test-renderer": "17.0.2"
},
"gitHead": "652ac656e7755e4b34bdd726071e8e26edb704a0"
"gitHead": "b725c9fbdca6b771f8b77c4f43eec7f324fa2c7e"
}

@@ -31,3 +31,3 @@ # ditox-react

- Multi-value tokens
- Typescript and Flow typings
- Typescript typings
- Supports Node.js, Deno and browsers

@@ -34,0 +34,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc