@cashub/utils 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/copyToClipboard.js +6 -6
- package/index.js +14 -0
- package/package.json +1 -1
- package/react/index.js +15 -0
- package/react/setRef.js +17 -0
package/copyToClipboard.js
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Copy text to clipboard
|
|
10
|
-
*
|
|
11
|
-
* @param {String} str the content that want to copy
|
|
12
|
-
*
|
|
13
|
-
* @return {Void}
|
|
8
|
+
/**
|
|
9
|
+
* Copy text to clipboard
|
|
10
|
+
*
|
|
11
|
+
* @param {String} str the content that want to copy
|
|
12
|
+
*
|
|
13
|
+
* @return {Void}
|
|
14
14
|
*/
|
|
15
15
|
var copyToClipboard = function copyToClipboard(str) {
|
|
16
16
|
var el = document.createElement('input');
|
package/index.js
CHANGED
|
@@ -41,6 +41,20 @@ Object.keys(_file).forEach(function (key) {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
+
var _react = require("./react");
|
|
45
|
+
|
|
46
|
+
Object.keys(_react).forEach(function (key) {
|
|
47
|
+
if (key === "default" || key === "__esModule") return;
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
49
|
+
if (key in exports && exports[key] === _react[key]) return;
|
|
50
|
+
Object.defineProperty(exports, key, {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _react[key];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
44
58
|
var _sort = require("./sort");
|
|
45
59
|
|
|
46
60
|
Object.keys(_sort).forEach(function (key) {
|
package/package.json
CHANGED
package/react/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "setRef", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _setRef.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _setRef = _interopRequireDefault(require("./setRef"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/react/setRef.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var setRef = function setRef(ref, value) {
|
|
9
|
+
if (typeof ref === 'function') {
|
|
10
|
+
ref(value);
|
|
11
|
+
} else if (ref) {
|
|
12
|
+
ref.current = value;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var _default = setRef;
|
|
17
|
+
exports.default = _default;
|