Prefix clusterio/lib imports with lib

Use lib* prefix for the modules impored from the lib package to help
distinguish them more from ordinary variables.  Fix up the naming
convention for files to be consistently lowercase_underscore for
JavaScript files.
This commit is contained in:
Hornwitser committed 2020-10-23 21:22:43 +02:00
1 parent fbbaf3dd3a
commit 24397b75cc
55 files changed
+692 -668

No files matched your search

+7 -7
View File
@@ -1,18 +1,18 @@
"use strict";
const assert = require("assert").strict;
const helpers = require("@clusterio/lib/helpers");
const libHelpers = require("@clusterio/lib/helpers");
describe("lib/helpers", function() {
describe("basicType()", function() {
it("should return the expected values", function() {
assert.equal(helpers.basicType("s"), "string");
assert.equal(helpers.basicType(null), "null");
assert.equal(helpers.basicType(undefined), "undefined");
assert.equal(helpers.basicType([1, 2]), "array");
assert.equal(helpers.basicType(7), "number");
assert.equal(helpers.basicType({ a: 1 }), "object");
assert.equal(libHelpers.basicType("s"), "string");
assert.equal(libHelpers.basicType(null), "null");
assert.equal(libHelpers.basicType(undefined), "undefined");
assert.equal(libHelpers.basicType([1, 2]), "array");
assert.equal(libHelpers.basicType(7), "number");
assert.equal(libHelpers.basicType({ a: 1 }), "object");
});
});
});