/has

Conditional utility.

Primary LanguageJavaScriptMIT LicenseMIT

Conditional Utility

Usage

CommonJS

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

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

ECMAScript

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)