'use strict'; var isMap = require('is-map'); var isSet = require('is-set'); var isWeakMap = require('is-weakmap'); var isWeakSet = require('is-weakset'); module.exports = function whichCollection(value) { if (value && typeof value === 'object') { if (isMap(value)) { return 'Map'; } if (isSet(value)) { return 'Set'; } if (isWeakMap(value)) { return 'WeakMap'; } if (isWeakSet(value)) { return 'WeakSet'; } } return false; };
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.github | Folder | 0755 |
|
|
test | Folder | 0755 |
|
|
.eslintrc | File | 162 B | 0644 |
|
.travis.yml | File | 163 B | 0644 |
|
CHANGELOG.md | File | 2.53 KB | 0644 |
|
LICENSE | File | 1.04 KB | 0644 |
|
README.md | File | 2.63 KB | 0644 |
|
index.js | File | 459 B | 0644 |
|
package.json | File | 1.75 KB | 0644 |
|