|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
542 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | const sample$1 = require('../../array/sample.js');
|
|---|
| 6 | const toArray = require('../_internal/toArray.js');
|
|---|
| 7 | const isArrayLike = require('../predicate/isArrayLike.js');
|
|---|
| 8 |
|
|---|
| 9 | function sample(collection) {
|
|---|
| 10 | if (collection == null) {
|
|---|
| 11 | return undefined;
|
|---|
| 12 | }
|
|---|
| 13 | if (isArrayLike.isArrayLike(collection)) {
|
|---|
| 14 | return sample$1.sample(toArray.toArray(collection));
|
|---|
| 15 | }
|
|---|
| 16 | return sample$1.sample(Object.values(collection));
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | exports.sample = sample;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.