Skip to content

Commit

Permalink
feat(math)!: move logicAnd, logicOr, logicNot to @vueuse/math (
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 8, 2022
1 parent a9ccce4 commit 1a4e0ad
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 17 deletions.
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

0 comments on commit 1a4e0ad

Please sign in to comment.