We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 420a7fc commit 61ba0a9Copy full SHA for 61ba0a9
package.json
@@ -50,13 +50,13 @@
50
},
51
"devDependencies": {
52
"@ostai/eslint-config": "^3.5.0",
53
- "ava": "^3.12.1",
+ "ava": "^3.13.0",
54
"codecov": "^3.7.2",
55
- "eslint": "^7.8.0",
56
- "eslint-plugin-import": "^2.22.0",
+ "eslint": "^7.10.0",
+ "eslint-plugin-import": "^2.22.1",
57
"nyc": "^15.1.0",
58
"test-fixture": "^2.4.1",
59
- "typescript": "^4.0.2"
+ "typescript": "^4.0.3"
60
61
"dependencies": {
62
"core-util-is": "^1.0.2",
src/array.js
@@ -8,7 +8,8 @@ const {
8
9
symbol,
10
define,
11
- copy_comments
+ copy_comments,
12
+ copy_all_comments
13
} = require('./common')
14
15
@@ -41,9 +42,7 @@ const reverse_comments = array => {
41
42
}
43
44
const move_comment = (target, source, i, offset, remove) => {
- SYMBOL_PREFIXES.forEach(prefix => {
45
- copy_comments(target, source, i + offset, i, prefix, remove)
46
- })
+ copy_all_comments(target, source, i + offset, i, remove)
47
48
49
const move_comments = (
src/common.js
@@ -64,6 +64,14 @@ const copy_comments = (
64
65
66
67
+const copy_all_comments = (
68
+ target, source, target_key, source_key, remove_source
69
+) => {
70
+ SYMBOL_PREFIXES.forEach(prefix => {
71
+ copy_comments(target, source, target_key, source_key, prefix, remove_source)
72
+ })
73
+}
74
+
75
const assign_non_prop_comments = (target, source) => {
76
NON_PROP_SYMBOL_KEYS.forEach(key => {
77
const comments = source[key]
@@ -82,9 +90,7 @@ const assign = (target, source, keys) => {
82
90
83
91
84
92
target[key] = source[key]
85
86
- copy_comments(target, source, key, key, prefix)
87
93
+ copy_all_comments(target, source, key, key)
88
94
})
89
95
96
return target
@@ -118,6 +124,7 @@ module.exports = {
118
124
119
125
120
126
copy_comments,
127
+ copy_all_comments,
121
128
assign_non_prop_comments,
122
129
123
130
assign (target, source, keys) {
0 commit comments