REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.72 KB
Close
//opt/alt/alt-nodejs8/root/lib/node_modules/npm/node_modules/xtend/test.js
Text
Base64
var test = require("tape") var extend = require("./") var mutableExtend = require("./mutable") test("merge", function(assert) { var a = { a: "foo" } var b = { b: "bar" } assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) assert.end() }) test("replace", function(assert) { var a = { a: "foo" } var b = { a: "bar" } assert.deepEqual(extend(a, b), { a: "bar" }) assert.end() }) test("undefined", function(assert) { var a = { a: undefined } var b = { b: "foo" } assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) assert.end() }) test("handle 0", function(assert) { var a = { a: "default" } var b = { a: 0 } assert.deepEqual(extend(a, b), { a: 0 }) assert.deepEqual(extend(b, a), { a: "default" }) assert.end() }) test("is immutable", function (assert) { var record = {} extend(record, { foo: "bar" }) assert.equal(record.foo, undefined) assert.end() }) test("null as argument", function (assert) { var a = { foo: "bar" } var b = null var c = void 0 assert.deepEqual(extend(b, a, c), { foo: "bar" }) assert.end() }) test("mutable", function (assert) { var a = { foo: "bar" } mutableExtend(a, { bar: "baz" }) assert.equal(a.bar, "baz") assert.end() }) test("null prototype", function(assert) { var a = { a: "foo" } var b = Object.create(null) b.b = "bar"; assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) assert.end() }) test("null prototype mutable", function (assert) { var a = { foo: "bar" } var b = Object.create(null) b.bar = "baz"; mutableExtend(a, b) assert.equal(a.bar, "baz") assert.end() })
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.npmignore
13 B
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
immutable.js
384 B
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENCE
1.03 KB
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Makefile
49 B
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mutable.js
369 B
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
1.80 KB
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
725 B
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
test.js
1.72 KB
lrw-r--r--
2021-09-28 10:29:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).