Browse Source

#210 Windows: Autodetect V8 API & V8 Engine Compiled Version - v8js_zeroPad

Jan Ehrhardt 9 years ago
parent
commit
44abbc5668
1 changed files with 5 additions and 0 deletions
  1. 5 0
      config.w32

+ 5 - 0
config.w32

@@ -1,6 +1,11 @@
 
 ARG_WITH("v8js", "for V8 Javascript Engine", "no");
 
+function v8js_zeroPad(num, places) {
+  var zero = places - num.toString().length + 1;
+  return Array(+(zero > 0 && zero)).join("0") + num;
+}
+
 if (PHP_V8JS != "no") {
 	if (CHECK_LIB("v8_libplatform.lib", "v8js") &&
 			CHECK_LIB("v8_libbase.lib", "v8js") &&