/**
 * @since Last modified: 2024-01-04 18:15:13
 * @function isSubset
 * @description Determine whether two arrays have a subset relationship.
 * @param {*} child  - The child,a array or not.
 * @param {any[]} parent  - Array of parent.
 * @returns {boolean} - Return true or false.
 * @see {@link https://codepen.io/axui/pen/dyrGVyW|demo @ codepen}
 * @example
 * ax.isSubset([0,1,2],[0,1,2,3,4]);
 * <!--return true-->
 * ax.isSubset(1,[0,1,2,3,4]);
 * <!--return true-->
 */
'use strict';
const isSubset = (child, parent) => (Array.isArray(child)) ? child.length <= parent.length && child.every(k => parent.includes(k)) : parent.includes(child);
export default isSubset;
