()
| 52 | trimLeftRx = /^\s+/; |
| 53 | |
| 54 | function checkShims () { |
| 55 | if (!has('string-trim')) { |
| 56 | proto.trim = function trim () { |
| 57 | return remove(remove(toString(this), trimLeftRx), trimRightRx); |
| 58 | }; |
| 59 | } |
| 60 | |
| 61 | if (!has('string-trimleft')) { |
| 62 | proto.trimLeft = function trimLeft () { |
| 63 | return remove(toString(this), trimLeftRx); |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | if (!has('string-trimright')) { |
| 68 | proto.trimRight = function trimRight () { |
| 69 | return remove(toString(this), trimRightRx); |
| 70 | }; |
| 71 | } |
| 72 | |
| 73 | } |
| 74 | |
| 75 | checkShims(); |
| 76 |