summaryrefslogtreecommitdiff
path: root/src/node_config.cc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2016-04-19 16:11:21 -0700
committerJames M Snell <jasnell@gmail.com>2016-04-21 11:37:47 -0700
commitcdba9a6c02ba3418feacaefa575d02fab0eb594b (patch)
tree025b73ae660144d6a48fd407007e8706950e4a49 /src/node_config.cc
parent2e974cdd8ce1829d50b8e8713633e4510b2d3e76 (diff)
downloadandroid-node-v8-cdba9a6c02ba3418feacaefa575d02fab0eb594b.tar.gz
android-node-v8-cdba9a6c02ba3418feacaefa575d02fab0eb594b.tar.bz2
android-node-v8-cdba9a6c02ba3418feacaefa575d02fab0eb594b.zip
src: add intl and icu configs to process.binding('config')
PR-URL: https://github.com/nodejs/node/pull/6266 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_config.cc')
-rw-r--r--src/node_config.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/node_config.cc b/src/node_config.cc
index e50002bc64..9ffea0beda 100644
--- a/src/node_config.cc
+++ b/src/node_config.cc
@@ -1,4 +1,5 @@
#include "node.h"
+#include "node_i18n.h"
#include "env.h"
#include "env-inl.h"
#include "util.h"
@@ -28,7 +29,18 @@ using v8::ReadOnly;
void InitConfig(Local<Object> target,
Local<Value> unused,
Local<Context> context) {
- // Environment* env = Environment::GetCurrent(context);
+ Environment* env = Environment::GetCurrent(context);
+
+#ifdef NODE_HAVE_I18N_SUPPORT
+ READONLY_BOOLEAN_PROPERTY("hasIntl");
+
+#ifdef NODE_HAVE_SMALL_ICU
+ READONLY_BOOLEAN_PROPERTY("hasSmallICU");
+#endif // NODE_HAVE_SMALL_ICU
+
+ if (flag_icu_data_dir)
+ READONLY_BOOLEAN_PROPERTY("usingICUDataDir");
+#endif // NODE_HAVE_I18N_SUPPORT
}
} // namespace node