diff options
author | James M Snell <jasnell@gmail.com> | 2016-04-19 16:11:21 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-04-21 11:37:47 -0700 |
commit | cdba9a6c02ba3418feacaefa575d02fab0eb594b (patch) | |
tree | 025b73ae660144d6a48fd407007e8706950e4a49 /src/node_config.cc | |
parent | 2e974cdd8ce1829d50b8e8713633e4510b2d3e76 (diff) | |
download | node-new-cdba9a6c02ba3418feacaefa575d02fab0eb594b.tar.gz |
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.cc | 14 |
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 |