You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
464 B
JavaScript
19 lines
464 B
JavaScript
"use strict";
|
|
|
|
// FIXME: Finish this later
|
|
|
|
const { validateArguments } = require("@validatem/core");
|
|
const isString = require("@validatem/is-string");
|
|
const isFunction = require("@validatem/is-function");
|
|
const required = require("@validatem/required");
|
|
|
|
module.exports = function mapTree(tree, predicate, childrenProperty) {
|
|
validateArguments(arguments, {
|
|
tree: [ required ],
|
|
predicate: [ required, isFunction ],
|
|
childrenProperty: [ isString ]
|
|
});
|
|
|
|
|
|
};
|