From 6eb66f6aaa1ffcf1212a92849cad192c45573434 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Sat, 29 Jun 2019 15:47:33 -0700 Subject: [PATCH] Move functions around --- lib/types/any.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/types/any.js b/lib/types/any.js index 0cf624df1..05b645669 100755 --- a/lib/types/any.js +++ b/lib/types/any.js @@ -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'); @@ -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('.');