Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fix fn declaration inside block (#194) #195

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
* Creates keys for `private` properties on exposed objects to minimize interactions with other codebases.
* The key will be a Symbol if the host supports it; otherwise a prefixed string.
*/
var create;

if (typeof Symbol !== 'undefined') {
function create(name) {
create = function (name) {
return Symbol(name);
}
}
} else {
function create(name) {
create = function (name) {
return '_zone$' + name;
}
}
Expand All @@ -20,4 +22,4 @@ var commonKeys = {
module.exports = {
create: create,
common: commonKeys
};
};