Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@hapi/hoek/lib/reachTemplate.js
1126 views
1
'use strict';
2
3
const Reach = require('./reach');
4
5
6
const internals = {};
7
8
9
module.exports = function (obj, template, options) {
10
11
return template.replace(/{([^{}]+)}/g, ($0, chain) => {
12
13
const value = Reach(obj, chain, options);
14
return (value === undefined || value === null ? '' : value);
15
});
16
};
17
18