You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
533 B
21 lines
533 B
2 years ago
|
var memoize = require('./memoize');
|
||
|
var isUndef = require('./isUndef');
|
||
|
var camelCase = require('./camelCase');
|
||
|
exports = memoize(
|
||
|
function(name, value) {
|
||
|
if (isUndef(value)) {
|
||
|
name = camelCase(name);
|
||
|
return !isUndef(style[name]);
|
||
|
}
|
||
|
style.cssText = '';
|
||
|
style.cssText = name + ':' + value;
|
||
|
return !!style.length;
|
||
|
},
|
||
|
function(name, value) {
|
||
|
return name + ' ' + value;
|
||
|
}
|
||
|
);
|
||
|
var style = document.createElement('p').style;
|
||
|
|
||
|
module.exports = exports;
|