BREAKING(std): reorganization (#5087)

* Prepend underscores to private modules
* Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result.
* Move std/_util/async.ts to std/async
* Move std/util/sha*.ts to std/hash
This commit is contained in:
Nayeem Rahman 2020-05-09 13:34:47 +01:00 committed by GitHub
parent 2b02535028
commit f184332c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
100 changed files with 306 additions and 365 deletions

View file

@ -1,24 +0,0 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
const { test } = Deno;
import { assertEquals, assert } from "../testing/asserts.ts";
import { deepAssign } from "./deep_assign.ts";
test("deepAssignTest", function (): void {
const date = new Date("1979-05-27T07:32:00Z");
const reg = RegExp(/DENOWOWO/);
const obj1 = { deno: { bar: { deno: ["is", "not", "node"] } } };
const obj2 = { foo: { deno: date } };
const obj3 = { foo: { bar: "deno" }, reg: reg };
const actual = deepAssign(obj1, obj2, obj3);
const expected = {
foo: {
deno: new Date("1979-05-27T07:32:00Z"),
bar: "deno",
},
deno: { bar: { deno: ["is", "not", "node"] } },
reg: RegExp(/DENOWOWO/),
};
assert(date !== expected.foo.deno);
assert(reg !== expected.reg);
assertEquals(actual, expected);
});