Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.117.132.79
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
node_modules /
type /
test /
iterable /
Delete
Unzip
Name
Size
Permission
Date
Action
ensure.js
1.38
KB
-rw-rw-r--
2022-08-30 11:49
is.js
2.37
KB
-rw-rw-r--
2022-08-30 11:49
Save
Rename
"use strict"; var assert = require("chai").assert , coerceString = require("../../string/coerce") , isArray = require("../../array/is") , ensureIterable = require("../../iterable/ensure"); describe("iterable/ensure", function () { it("Should return input value", function () { var value = []; assert.equal(ensureIterable(value), value); }); it("Should allow strings with allowString option", function () { var value = "foo"; assert.equal(ensureIterable(value, { allowString: true }), value); }); it("Should crash on invalid value", function () { try { ensureIterable("foo"); throw new Error("Unexpected"); } catch (error) { assert.equal(error.name, "TypeError"); assert(error.message.includes("is not expected iterable value")); } }); describe("Should support 'coerceItem' option", function () { it("Should resolve coerced array", function () { var coercedValue = ensureIterable(new Set(["foo", 12]), { coerceItem: coerceString }); assert(isArray(coercedValue)); assert.deepEqual(coercedValue, ["foo", "12"]); }); it("Should crash if some value is non coercible", function () { try { ensureIterable(["foo", {}], { coerceItem: coerceString }); throw new Error("Unexpected"); } catch (error) { assert.equal(error.name, "TypeError"); assert(error.message.includes("is not expected iterable value")); } }); }); });