How to use the shallow function from hoek
Find comprehensive JavaScript hoek.shallow code examples handpicked from public code repositorys.
GitHub: devinivy/dogwater
65 66 67 68 69 70 71 72 73 74
}; // Massage registration config for use with rejoice internals.registrationConfig = (options) => { const config = Hoek.shallow(options); delete config.defaults; delete config.teardownOnStop; // Resolve models
14
102
9
GitHub: WesTyler/hapi
81 82 83 84 85 86 87 88 89 90
this.orig = {}; this.params = null; this.paramsArray = null; // Array of path parameters in path order this.path = null; this.payload = null; this.plugins = (options.plugins ? Hoek.shallow(options.plugins) : {}); // Place for plugins to store state without conflicts with hapi, should be namespaced using plugin name this.pre = {}; // Pre raw values this.preResponses = {}; // Pre response values this.raw = { req, res }; this.response = null;
0
1
2
+ 7 other calls in file
GitHub: yaowang908/hapi
209 210 211 212 213 214 215 216 217 218
if (typeof plugin === 'function') { if (!plugin.register) { // plugin is register() function plugin = { register: plugin }; } else { plugin = Hoek.shallow(plugin); // Convert function to object } } if (plugin.register.register) { // Required plugin
0
0
1
GitHub: applicaster/hapi
75 76 77 78 79 80 81 82 83 84
const ext = new internals.Ext(type, route._core); const events = route.settings.ext[type]; if (events) { for (let event of events) { event = Hoek.shallow(event); Hoek.assert(!event.options.sandbox, 'Cannot specify sandbox option for route extension'); event.realm = route.realm; ext.add(event); }
0
0
6
hoek.assert is the most popular function in hoek (1712 examples)