1 | (function() {
|
2 | module.exports = function($) {
|
3 | var wrapList;
|
4 | ({wrapList} = $.fn);
|
5 | return $.move_ = async function(source, target) {
|
6 | var listSource;
|
7 | if (!(source && target)) {
|
8 | throw new Error('invalid argument length');
|
9 | }
|
10 | listSource = (await $.source_(source));
|
11 | if (!listSource.length) {
|
12 | return $;
|
13 | }
|
14 | $.info.pause('$.move_');
|
15 | await $.copy_(listSource, target);
|
16 | await $.remove_(listSource);
|
17 | $.info.resume('$.move_');
|
18 | $.info('move', `moved ${wrapList(source)} to '${target}'`);
|
19 | return $;
|
20 | };
|
21 | };
|
22 |
|
23 | }).call(this);
|