main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
445 bytes
|
Line | |
---|
1 | var _filter =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./_filter.js");
|
---|
4 | /**
|
---|
5 | * @private
|
---|
6 | * @param {Function} fn The strategy for extracting function names from an object
|
---|
7 | * @return {Function} A function that takes an object and returns an array of function names.
|
---|
8 | */
|
---|
9 |
|
---|
10 |
|
---|
11 | function _functionsWith(fn) {
|
---|
12 | return function (obj) {
|
---|
13 | return _filter(function (key) {
|
---|
14 | return typeof obj[key] === 'function';
|
---|
15 | }, fn(obj));
|
---|
16 | };
|
---|
17 | }
|
---|
18 |
|
---|
19 | module.exports = _functionsWith; |
---|
Note:
See
TracBrowser
for help on using the repository browser.