Skip to content

Commit

Permalink
Move functions around
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Jun 29, 2019
1 parent e81dfee commit 6eb66f6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/types/any.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,6 @@ module.exports = internals.Any = class {
return this._flag('presence', 'forbidden');
}

fork(paths, adjuster) {

Hoek.assert(!this._inRuleset(), 'Cannot fork inside a ruleset');

let obj = this; // eslint-disable-line consistent-this
for (let path of [].concat(paths)) {
path = Array.isArray(path) ? path : path.split('.');
obj = obj._ids.fork(path, adjuster, obj);
}

obj._ruleset = false;
return obj;
}

id(id) {

Hoek.assert(id && typeof id === 'string', 'id must be a non-empty string');
Expand Down Expand Up @@ -583,6 +569,20 @@ module.exports = internals.Any = class {
return this._ids.reach(path);
}

fork(paths, adjuster) {

Hoek.assert(!this._inRuleset(), 'Cannot fork inside a ruleset');

let obj = this; // eslint-disable-line consistent-this
for (let path of [].concat(paths)) {
path = Array.isArray(path) ? path : path.split('.');
obj = obj._ids.fork(path, adjuster, obj);
}

obj._ruleset = false;
return obj;
}

mapLabels(path) {

path = Array.isArray(path) ? path : path.split('.');
Expand Down

0 comments on commit 6eb66f6

Please sign in to comment.