MCPcopy Create free account
hub / github.com/dashnowords/imfe / isArray

Function isArray

chapter05/example5-2.js:29–31  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

27
28//判断传入的是否是一个数组
29function isArray(data) {
30 return Object.prototype.toString.call(data).slice(8, -1) === 'Array';
31}
32
33console.log(getAllFood(originData));

Callers 1

flatmapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected