Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / exotic   js

Repository URL to install this package:

Version: 2.0.8 

/ src / types / @omni / presets / isDotPropPath.ts

import { includes } from '../../../deps'
import { isArray } from '../../array/check/isArray'
import { isString } from '../../primitive/string'

/**
 * @since 3.0.0
 * @memberOf is
 * @name isDot
 *
 * @TODO update with conditional
 *
 * @param  {*} x value to check
 * @return {boolean} x isDot
 *
 * @see isArray
 * @see isString
 * @see includes
 *
 * @example
 *    isDot('eh.oh')      //=> true
 *    isDot('eh')         //=> false
 *    isDot(['eh', 'oh']) //=> true
 */
export default function isDot(x) {
  return isArray(x) || (isString(x) && x.includes('.'))
}