intelicoreact 0.1.73 → 0.1.74

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.
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
8
+ exports.changeMeta = exports.addBitDepthPoints = exports.throttle = exports.debounce = exports.getColorById = exports.getStyles = exports.logout = exports.useOutsideToggle = exports.handleObjectChange = void 0;
9
9
 
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
 
@@ -136,4 +136,23 @@ var addBitDepthPoints = function addBitDepthPoints(value) {
136
136
  return isFraction ? intPart + value.slice(value.indexOf('.')) : intPart;
137
137
  };
138
138
 
139
- exports.addBitDepthPoints = addBitDepthPoints;
139
+ exports.addBitDepthPoints = addBitDepthPoints;
140
+
141
+ var changeMeta = function changeMeta(key) {
142
+ var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
143
+ var defaultMeta = items.find(function (i) {
144
+ return i.key === 'default';
145
+ });
146
+
147
+ if (key) {
148
+ var _item$title, _item$description;
149
+
150
+ var item = items.find(function (i) {
151
+ return i.key === key;
152
+ });
153
+ document.title = (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : defaultMeta === null || defaultMeta === void 0 ? void 0 : defaultMeta.title;
154
+ document.description = (_item$description = item === null || item === void 0 ? void 0 : item.description) !== null && _item$description !== void 0 ? _item$description : defaultMeta === null || defaultMeta === void 0 ? void 0 : defaultMeta.description;
155
+ }
156
+ };
157
+
158
+ exports.changeMeta = changeMeta;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.73",
3
+ "version": "0.1.74",
4
4
  "description": "add react",
5
5
  "main": "dist/index.js",
6
6
  "files": [