forked from enviPath/enviPy
Current Dev State
This commit is contained in:
21
static/js/ketcher2/node_modules/globo/index.js
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/globo/index.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
var ternary = require('ternary')
|
||||
var isDefined = require('is-defined')
|
||||
var access = require('accessory')
|
||||
|
||||
module.exports = function globalize (property) {
|
||||
return parenthesize(ternary(
|
||||
isDefined('window'),
|
||||
access('window', property),
|
||||
ternary(
|
||||
isDefined('global'),
|
||||
access('global', property),
|
||||
null
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
function parenthesize (string) {
|
||||
return '(' + string + ')'
|
||||
}
|
||||
Reference in New Issue
Block a user