Add Zotero.DataObjectUtilities.generateKey()
For now, this just calls Zotero.Utilities.generateObjectKey(), but this function makes more sense in DataObjectUtilities. It does need to be accessible to the connectors, but if it's possible to add an alias in Zotero.Utilities just for the connectors, it'd probably be better to do that and use Zotero.DataObjectUtilities.generateKey() elsewhere.
This commit is contained in:
parent
fd45032210
commit
cc3d81da93
1 changed files with 6 additions and 0 deletions
|
@ -43,6 +43,12 @@ Zotero.DataObjectUtilities = {
|
|||
return intValue;
|
||||
},
|
||||
|
||||
|
||||
generateKey: function () {
|
||||
return Zotero.Utilities.generateObjectKey();
|
||||
},
|
||||
|
||||
|
||||
"checkKey": function(key) {
|
||||
if (!key) return null;
|
||||
if (!Zotero.Utilities.isValidObjectKey(key)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue