summaryrefslogtreecommitdiff
path: root/src/lstrlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-22 11:28:02 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-22 11:28:02 +1100
commitdaeddc461166692743368eb9e68aa041f3994714 (patch)
tree283e86e19a70495d227f2501fce2c0e8b30fbfe0 /src/lstrlib.js
parentedafa230fd74d06ec5f292c7ba471c932942a7c1 (diff)
downloadfengari-daeddc461166692743368eb9e68aa041f3994714.tar.gz
fengari-daeddc461166692743368eb9e68aa041f3994714.tar.bz2
fengari-daeddc461166692743368eb9e68aa041f3994714.zip
src/l*lib.js: Use lualib.lua_assert from standard library
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r--src/lstrlib.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js
index 5477750..33076ef 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -1,11 +1,11 @@
"use strict";
-const assert = require('assert');
const sprintf = require('sprintf-js').sprintf;
const lauxlib = require('./lauxlib.js');
const lua = require('./lua.js');
const luaconf = require('./luaconf.js');
+const lualib = require('./lualib.js');
const {luastring_indexOf, to_jsstring, to_luastring} = require("./fengaricore.js");
const sL_ESC = '%';
@@ -724,7 +724,7 @@ const unpackint = function(L, str, islittle, size, issigned) {
};
const unpacknum = function(L, b, islittle, size) {
- assert(b.length >= size);
+ lualib.lua_assert(b.length >= size);
let dv = new DataView(new ArrayBuffer(size));
for (let i = 0; i < size; i++)
@@ -1148,7 +1148,7 @@ const prepstate = function(ms, L, s, ls, p, lp) {
const reprepstate = function(ms) {
ms.level = 0;
- assert(ms.matchdepth === MAXCCALLS);
+ lualib.lua_assert(ms.matchdepth === MAXCCALLS);
};
const find_subarray = function(arr, subarr, from_index) {