Socket
Socket
Sign inDemoInstall

metal

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metal - npm Package Compare versions

Comparing version 1.0.0-rc.2 to 1.0.0-rc.3

14

lib/core.js

@@ -84,4 +84,6 @@ 'use strict';

* returns. See {@link core.UID_PROPERTY}.
* @type {opt_object} Optional object to be mutated with the uid. If not
* specified this method only returns the uid.
* @param {Object=} opt_object Optional object to be mutated with the uid. If
* not specified this method only returns the uid.
* @param {boolean=} opt_noInheritance Optional flag indicating if this
* object's uid property can be inherited from parents or not.
* @throws {Error} when invoked to indicate the method should be overridden.

@@ -92,5 +94,9 @@ */

key: 'getUid',
value: function getUid(opt_object) {
value: function getUid(opt_object, opt_noInheritance) {
if (opt_object) {
return opt_object[core.UID_PROPERTY] || (opt_object[core.UID_PROPERTY] = core.uniqueIdCounter_++);
var id = opt_object[core.UID_PROPERTY];
if (opt_noInheritance && !opt_object.hasOwnProperty[core.UID_PROPERTY]) {
id = null;
}
return id || (opt_object[core.UID_PROPERTY] = core.uniqueIdCounter_++);
}

@@ -97,0 +103,0 @@ return core.uniqueIdCounter_++;

{
"name": "metal",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"description": "Build UI components in a solid, flexible way",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -60,10 +60,15 @@ 'use strict';

* returns. See {@link core.UID_PROPERTY}.
* @type {opt_object} Optional object to be mutated with the uid. If not
* specified this method only returns the uid.
* @param {Object=} opt_object Optional object to be mutated with the uid. If
* not specified this method only returns the uid.
* @param {boolean=} opt_noInheritance Optional flag indicating if this
* object's uid property can be inherited from parents or not.
* @throws {Error} when invoked to indicate the method should be overridden.
*/
static getUid(opt_object) {
static getUid(opt_object, opt_noInheritance) {
if (opt_object) {
return opt_object[core.UID_PROPERTY] ||
(opt_object[core.UID_PROPERTY] = core.uniqueIdCounter_++);
var id = opt_object[core.UID_PROPERTY];
if (opt_noInheritance && !opt_object.hasOwnProperty[core.UID_PROPERTY]) {
id = null;
}
return id || (opt_object[core.UID_PROPERTY] = core.uniqueIdCounter_++);
}

@@ -70,0 +75,0 @@ return core.uniqueIdCounter_++;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc