'use strict'

var window = require('global/window')
var document = require('global/document')
var toArray = require('to-array')

var PREFIXES = /-(webkit|ms)-/

module.exports = detectVendorPrefix()

function detectVendorPrefix () {
  if (!window.getComputedStyle) return ''
  var styles = window.getComputedStyle(document.documentElement, '')
  return toArray(styles).join('').match(PREFIXES)[1]
}

'use strict'

var window = require('global/window')
var document = require('global/document')
var toArray = require('to-array')

var PREFIXES = /-(webkit|ms)-/

module.exports = detectVendorPrefix()

function detectVendorPrefix () {
  if (!window.getComputedStyle) return ''
  var styles = window.getComputedStyle(document.documentElement, '')
  var match = toArray(styles).join('').match(PREFIXES)
  return match ? match[1] : ''
}

Return an empty string when no matches are found, e.g. Firefox
Return an empty string when no matches are found, e.g. Firefox
