summaryrefslogtreecommitdiff
path: root/src/fengaricore.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-11 23:33:34 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-11 23:35:56 +1100
commita39f24f204a15cb4587e75b38424952fe444d9d2 (patch)
tree5047cd8b5b73bda87142405273c0dcc3203e71f4 /src/fengaricore.js
parentb0b0b21f4394fabf41d6e3556f455a0a740f3f08 (diff)
downloadfengari-a39f24f204a15cb4587e75b38424952fe444d9d2.tar.gz
fengari-a39f24f204a15cb4587e75b38424952fe444d9d2.tar.bz2
fengari-a39f24f204a15cb4587e75b38424952fe444d9d2.zip
Move fengari specific things to src/fengaricore.js
String manipulation functions now get exposed on 'fengari' object itself at top level
Diffstat (limited to 'src/fengaricore.js')
-rw-r--r--src/fengaricore.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/fengaricore.js b/src/fengaricore.js
new file mode 100644
index 0000000..1fd0354
--- /dev/null
+++ b/src/fengaricore.js
@@ -0,0 +1,36 @@
+/* Fengari specific functions
+ *
+ * This file includes fengari-specific data or and functionality for users to
+ * manipulate fengari's string type.
+ * The fields are exposed to the user on the 'fengari' entry point; however to
+ * avoid a dependency on defs.js from lauxlib.js they are defined in this file.
+ */
+
+const defs = require("./defs.js");
+
+const FENGARI_VERSION_MAJOR = "0";
+const FENGARI_VERSION_MINOR = "0";
+const FENGARI_VERSION_NUM = 1;
+const FENGARI_VERSION_RELEASE = "1";
+const FENGARI_VERSION = "Fengari " + FENGARI_VERSION_MAJOR + "." + FENGARI_VERSION_MINOR;
+const FENGARI_RELEASE = FENGARI_VERSION + "." + FENGARI_VERSION_RELEASE;
+const FENGARI_AUTHORS = "B. Giannangeli, Daurnimator";
+const FENGARI_COPYRIGHT = FENGARI_RELEASE + " Copyright (C) 2017-2018 " + FENGARI_AUTHORS + "\nBased on: " + defs.LUA_COPYRIGHT;
+
+module.exports.FENGARI_AUTHORS = FENGARI_AUTHORS;
+module.exports.FENGARI_COPYRIGHT = FENGARI_COPYRIGHT;
+module.exports.FENGARI_RELEASE = FENGARI_RELEASE;
+module.exports.FENGARI_VERSION = FENGARI_VERSION;
+module.exports.FENGARI_VERSION_MAJOR = FENGARI_VERSION_MAJOR;
+module.exports.FENGARI_VERSION_MINOR = FENGARI_VERSION_MINOR;
+module.exports.FENGARI_VERSION_NUM = FENGARI_VERSION_NUM;
+module.exports.FENGARI_VERSION_RELEASE = FENGARI_VERSION_RELEASE;
+module.exports.is_luastring = defs.is_luastring;
+module.exports.luastring_eq = defs.luastring_eq;
+module.exports.luastring_from = defs.luastring_from;
+module.exports.luastring_indexOf = defs.luastring_indexOf;
+module.exports.luastring_of = defs.luastring_of;
+module.exports.to_jsstring = defs.to_jsstring;
+module.exports.to_luastring = defs.to_luastring;
+module.exports.to_uristring = defs.to_uristring;
+module.exports.from_userstring = defs.from_userstring;