any value to take elements from. Usually an Array, Object, Map, Iterator etc. but you can also pass single values, like a number, string etc - see loopSingles option.
the number of elements to take. If a function, it will be called with (item, keyIdx, value, count). If it returns true it will take items, as soon as it returns false or z.STOP it stops taking items.
Optionaloptions: Toptionsyou can optionally pass an IloopOptions object to control which keys / idx are visited (own / inherited / enumerable etc) and more.
z.filter for filtering elements - the filterSingles option also applies here: if take is used with isSingle values, filterSingles must be true or it will throw an error.
Takes
nelements from the beginning of the value (Array,Object,Set,Mapetc). Ifnis a function, it stops as soon as it returnsfalseorz.STOP.If
options.props& value is an_.isObject()other thanrealObject, it will retrieve (i.eclone) both:nkeys/idx of the value (eg the Array elements, Set items etc)nof propsNote: No guaranteed order for property bags like
Objects,Sets,Mapsetc and return the same value type of input value.