https://github.com/afeiship/next-if
If condition for next.
https://github.com/afeiship/next-if
condition else if next
Last synced: 9 days ago
JSON representation
If condition for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-if
- Owner: afeiship
- License: mit
- Created: 2019-03-20T07:18:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T02:15:03.000Z (over 3 years ago)
- Last Synced: 2025-10-06T10:01:35.049Z (7 months ago)
- Topics: condition, else, if, next
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-if
> If condition for next.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-if
```
## usage
```js
import '@jswork/next-if';
const obj1 = { name: 'fei' };
const res1 = nx.if(obj1.name === 'fei', 'yes', 'no');
// yes
```
## license
Code released under [the MIT license](https://github.com/afeiship/next-if/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-if
[version-url]: https://npmjs.org/package/@jswork/next-if
[license-image]: https://img.shields.io/npm/l/@jswork/next-if
[license-url]: https://github.com/afeiship/next-if/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-if
[size-url]: https://github.com/afeiship/next-if/blob/master/dist/next-if.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-if
[download-url]: https://www.npmjs.com/package/@jswork/next-if