Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/taufik-nurrohman/has

Conditional utility.
https://github.com/taufik-nurrohman/has

condition has helper if node utility

Last synced: 17 days ago
JSON representation

Conditional utility.

Awesome Lists containing this project

README

        

Conditional Utility
===================

Usage
-----

### CommonJS

~~~ js
const {hasValue} = require('@taufik-nurrohman/has');

console.log(hasValue('foo', ['foo', 'bar', 'baz']));
~~~

### ECMAScript

~~~ js
import {hasValue} from '@taufik-nurrohman/has';

console.log(hasValue('foo', ['foo', 'bar', 'baz']));
~~~

Methods
-------

### hasKey(key, object)

### hasObjectKey(key, object)

### hasObjectValue(key, object)

### hasString(x, string, ?start)

### hasStringStart(x, string, ?start)

### hasStringEnd(x, string, ?end)

### hasValue(value, array)