$ npm install add-px-to-style
Will add px to the end of style values which are Numbers. The following style properties will not have px added.
var addPxToStyle = require('add-px-to-style');
addPxToStyle('top', 22); // '22px'
addPxToStyle('zIndex', 3); // 3
MIT, see LICENSE.md for details.
© 2010 - cnpmjs.org x YWFE | Home | YWFE