* Append a CSS unit (only if required) to a string * @param {string} value to css-ify * @returns {string} value with css unit * @memberof DataTable#oApi
(s)
| 5124 | * @memberof DataTable#oApi |
| 5125 | */ |
| 5126 | function _fnStringToCss(s) { |
| 5127 | if (s === null) { |
| 5128 | return "0px" |
| 5129 | } |
| 5130 | |
| 5131 | if (typeof s == "number") { |
| 5132 | return s < 0 ? "0px" : s + "px" |
| 5133 | } |
| 5134 | |
| 5135 | // Check it has a unit character already |
| 5136 | return s.match(/\d$/) ? s + "px" : s |
| 5137 | } |
| 5138 | |
| 5139 | /** |
| 5140 | * Re-insert the `col` elements for current visibility |
no outgoing calls
no test coverage detected