Comparing version 2.4.3 to 2.4.4
'use strict'; | ||
/** | ||
* A collection of core utility functions. | ||
* @const | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -18,2 +13,9 @@ value: true | ||
var compatibilityModeData_ = void 0; | ||
/** | ||
* A collection of core utility functions. | ||
* @const | ||
*/ | ||
var core = function () { | ||
@@ -63,2 +65,48 @@ function core() { | ||
/** | ||
* Disables Metal.js's compatibility mode. | ||
*/ | ||
}, { | ||
key: 'disableCompatibilityMode', | ||
value: function disableCompatibilityMode() { | ||
compatibilityModeData_ = null; | ||
} | ||
/** | ||
* Enables Metal.js's compatibility mode with the following features from rc | ||
* and 1.x versions: | ||
* - Using "key" to reference component instances. In the current version | ||
* this should be done via "ref" instead. This allows old code still | ||
* using "key" to keep working like before. NOTE: this may cause | ||
* problems, since "key" is meant to be used differently. Only use this | ||
* if it's not possible to upgrade the code to use "ref" instead. | ||
* @param {Object=} opt_data Optional object with data to specify more | ||
* details, such as: | ||
* - renderers {Array} the template renderers that should be in | ||
* compatibility mode. By default, all the ones that extend from | ||
* IncrementalDomRenderer. | ||
* @type {Object} | ||
*/ | ||
}, { | ||
key: 'enableCompatibilityMode', | ||
value: function enableCompatibilityMode() { | ||
var opt_data = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
compatibilityModeData_ = opt_data; | ||
} | ||
/** | ||
* Returns the data used for compatibility mode, or nothing if it hasn't been | ||
* enabled. | ||
* @return {Object} | ||
*/ | ||
}, { | ||
key: 'getCompatibilityModeData', | ||
value: function getCompatibilityModeData() { | ||
return compatibilityModeData_; | ||
} | ||
/** | ||
* Gets the name of the given function. If the current browser doesn't | ||
@@ -65,0 +113,0 @@ * support the `name` property, this will calculate it from the function's |
{ | ||
"name": "metal", | ||
"version": "2.4.3", | ||
"version": "2.4.4", | ||
"description": "Core functions from Metal.js, with utilities for dealing with arrays, objects and others.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
'use strict'; | ||
let compatibilityModeData_; | ||
/** | ||
@@ -41,2 +43,37 @@ * A collection of core utility functions. | ||
/** | ||
* Disables Metal.js's compatibility mode. | ||
*/ | ||
static disableCompatibilityMode() { | ||
compatibilityModeData_ = null; | ||
} | ||
/** | ||
* Enables Metal.js's compatibility mode with the following features from rc | ||
* and 1.x versions: | ||
* - Using "key" to reference component instances. In the current version | ||
* this should be done via "ref" instead. This allows old code still | ||
* using "key" to keep working like before. NOTE: this may cause | ||
* problems, since "key" is meant to be used differently. Only use this | ||
* if it's not possible to upgrade the code to use "ref" instead. | ||
* @param {Object=} opt_data Optional object with data to specify more | ||
* details, such as: | ||
* - renderers {Array} the template renderers that should be in | ||
* compatibility mode. By default, all the ones that extend from | ||
* IncrementalDomRenderer. | ||
* @type {Object} | ||
*/ | ||
static enableCompatibilityMode(opt_data = {}) { | ||
compatibilityModeData_ = opt_data; | ||
} | ||
/** | ||
* Returns the data used for compatibility mode, or nothing if it hasn't been | ||
* enabled. | ||
* @return {Object} | ||
*/ | ||
static getCompatibilityModeData() { | ||
return compatibilityModeData_; | ||
} | ||
/** | ||
* Gets the name of the given function. If the current browser doesn't | ||
@@ -43,0 +80,0 @@ * support the `name` property, this will calculate it from the function's |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56751
1641