# wxapp-computed

> 在微信小程序中使计算值(computed)

Latest version **1.0.2** (published 2019-03-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install wxapp-computed
pnpm add wxapp-computed
yarn add wxapp-computed
bun add wxapp-computed
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-03-19 |
| First published | 2018-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | liangyun |
| Maintainers | b5156 |
| Keywords | computed, computed, vue, weapp, wxapp, wechat |

## Links

- npm: https://www.npmjs.com/package/wxapp-computed
- Repository: https://github.com/b5156/wxapp-computed
- Homepage: https://github.com/b5156/wxapp-computed#readme
- Issues: https://github.com/b5156/wxapp-computed/issues
- npm.io page: https://npm.io/package/wxapp-computed

## Recent versions

- 1.0.2 (latest) — 2019-03-19
- 1.0.1 — 2018-08-27
- 1.0.0 — 2018-08-19

## README

# wxapp-computed

在小程序中使计算值(computed),易用、轻量、无依赖、无侵入。

## Installation

```
npm install wxapp-computed
````


## Example

```js
import computed from 'wxapp-computed'

Page(
  computed({
    data: {
      name: 'Messi',
      get uppercaseName() {
        return this.name.toUpperCase()
      },
      get reversedName() {
        return this.uppercaseName.split('').reverse().join('')
      }
    },
    onLoad() {
      // this.setData({ name: 'Ronaldo' })
    }
    // ...
  })
)
```

```xml
<view>
  {{name}} / {{uppercaseName}} / {{reversedName}}
</view>
```


## API

### computed(page:Object)

传入 page 页面对象.

## License

ISC

---
_Source: https://npm.io/package/wxapp-computed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
