Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(math)!: move logicAnd, logicOr, logicNot to @vueuse/math #1794

Merged
merged 1 commit into from Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/add-ons.md
Expand Up @@ -71,7 +71,7 @@ Utilities for vue-router
Integration wrappers for utility libraries
- [`useAsyncValidator`](https://vueuse.org/integrations/useAsyncValidator/) — wrapper for [`async-validator`](https://github.com/yiminghe/async-validator)
- [`useAxios`](https://vueuse.org/integrations/useAxios/) — wrapper for [`axios`](https://github.com/axios/axios)
- [`useChangeCase`](https://vueuse.org/integrations/useChangeCase/) — wrapper for [`change-case`](https://github.com/blakeembrey/change-case)
- [`useChangeCase`](https://vueuse.org/integrations/useChangeCase/) — reactive wrapper for [`change-case`](https://github.com/blakeembrey/change-case)
- [`useCookies`](https://vueuse.org/integrations/useCookies/) — wrapper for [`universal-cookie`](https://www.npmjs.com/package/universal-cookie)
- [`useDrauu`](https://vueuse.org/integrations/useDrauu/) — reactive instance for [drauu](https://github.com/antfu/drauu)
- [`useFocusTrap`](https://vueuse.org/integrations/useFocusTrap/) — reactive wrapper for [`focus-trap`](https://github.com/focus-trap/focus-trap)
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/README.md
Expand Up @@ -16,7 +16,7 @@ npm i <b>@vueuse/integrations</b>
<!--FUNCTIONS_LIST_STARTS-->
- [`useAsyncValidator`](https://vueuse.org/integrations/useAsyncValidator/) — wrapper for [`async-validator`](https://github.com/yiminghe/async-validator)
- [`useAxios`](https://vueuse.org/integrations/useAxios/) — wrapper for [`axios`](https://github.com/axios/axios)
- [`useChangeCase`](https://vueuse.org/integrations/useChangeCase/) — wrapper for [`change-case`](https://github.com/blakeembrey/change-case)
- [`useChangeCase`](https://vueuse.org/integrations/useChangeCase/) — reactive wrapper for [`change-case`](https://github.com/blakeembrey/change-case)
- [`useCookies`](https://vueuse.org/integrations/useCookies/) — wrapper for [`universal-cookie`](https://www.npmjs.com/package/universal-cookie)
- [`useDrauu`](https://vueuse.org/integrations/useDrauu/) — reactive instance for [drauu](https://github.com/antfu/drauu)
- [`useFocusTrap`](https://vueuse.org/integrations/useFocusTrap/) — reactive wrapper for [`focus-trap`](https://github.com/focus-trap/focus-trap)
Expand Down
3 changes: 3 additions & 0 deletions packages/math/index.ts
@@ -1 +1,4 @@
export * from './logicAnd'
export * from './logicNot'
export * from './logicOr'
export * from './useProjection'
@@ -1,5 +1,5 @@
---
category: Utilities
category: '@Math'
alias: and
related: logicNot, logicOr
---
Expand All @@ -11,7 +11,8 @@ related: logicNot, logicOr
## Usage

```ts
import { logicAnd } from '@vueuse/core'
import { logicAnd } from '@vueuse/math'
import { whenever } from '@vueuse/core'

const a = ref(true)
const b = ref(false)
Expand Down
@@ -1,7 +1,7 @@
import type { ComputedRef } from 'vue-demi'
import { computed } from 'vue-demi'
import { resolveUnref } from '../resolveUnref'
import type { MaybeComputedRef } from '../utils'
import { resolveUnref } from '@vueuse/shared'
import type { MaybeComputedRef } from '@vueuse/shared'

/**
* `AND` conditions for refs.
Expand Down
@@ -1,5 +1,5 @@
---
category: Utilities
category: '@Math'
alias: not
---

Expand All @@ -10,7 +10,8 @@ alias: not
## Usage

```ts
import { logicNot } from '@vueuse/core'
import { logicNot } from '@vueuse/math'
import { whenever } from '@vueuse/core'

const a = ref(true)

Expand Down
@@ -1,7 +1,7 @@
import type { ComputedRef } from 'vue-demi'
import { computed } from 'vue-demi'
import { resolveUnref } from '../resolveUnref'
import type { MaybeComputedRef } from '../utils'
import { resolveUnref } from '@vueuse/shared'
import type { MaybeComputedRef } from '@vueuse/shared'

/**
* `NOT` conditions for refs.
Expand Down
@@ -1,5 +1,5 @@
---
category: Utilities
category: '@Math'
alias: or
related: logicAnd, logicNot
---
Expand All @@ -11,7 +11,8 @@ related: logicAnd, logicNot
## Usage

```ts
import { logicOr } from '@vueuse/core'
import { logicOr } from '@vueuse/math'
import { whenever } from '@vueuse/core'

const a = ref(true)
const b = ref(false)
Expand Down
@@ -1,7 +1,7 @@
import type { ComputedRef } from 'vue-demi'
import { computed } from 'vue-demi'
import { resolveUnref } from '../resolveUnref'
import type { MaybeComputedRef } from '../utils'
import { resolveUnref } from '@vueuse/shared'
import type { MaybeComputedRef } from '@vueuse/shared'

/**
* `OR` conditions for refs.
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/index.ts
Expand Up @@ -7,9 +7,6 @@ export * from './createSharedComposable'
export * from './extendRef'
export * from './get'
export * from './isDefined'
export * from './logicAnd'
export * from './logicNot'
export * from './logicOr'
export * from './makeDestructurable'
export * from './reactify'
export * from './reactifyObject'
Expand Down