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:
408 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import _filter from "./_filter.js";
|
---|
| 2 | /**
|
---|
| 3 | * @private
|
---|
| 4 | * @param {Function} fn The strategy for extracting function names from an object
|
---|
| 5 | * @return {Function} A function that takes an object and returns an array of function names.
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | export default function _functionsWith(fn) {
|
---|
| 9 | return function (obj) {
|
---|
| 10 | return _filter(function (key) {
|
---|
| 11 | return typeof obj[key] === 'function';
|
---|
| 12 | }, fn(obj));
|
---|
| 13 | };
|
---|
| 14 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.