source: imaps-frontend/node_modules/string.prototype.trim/polyfill.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 547 bytes
Line 
1'use strict';
2
3var implementation = require('./implementation');
4
5var zeroWidthSpace = '\u200b';
6var mongolianVowelSeparator = '\u180E';
7
8module.exports = function getPolyfill() {
9 if (
10 String.prototype.trim
11 && zeroWidthSpace.trim() === zeroWidthSpace
12 && mongolianVowelSeparator.trim() === mongolianVowelSeparator
13 && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)
14 && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')
15 ) {
16 return String.prototype.trim;
17 }
18 return implementation;
19};
Note: See TracBrowser for help on using the repository browser.