diff options
Diffstat (limited to 'node_modules/es5-ext/string/#/last.js')
-rw-r--r-- | node_modules/es5-ext/string/#/last.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/es5-ext/string/#/last.js b/node_modules/es5-ext/string/#/last.js new file mode 100644 index 000000000..f5c957fca --- /dev/null +++ b/node_modules/es5-ext/string/#/last.js @@ -0,0 +1,8 @@ +"use strict"; + +var value = require("../../object/valid-value"); + +module.exports = function () { + var self = String(value(this)), length = self.length; + return length ? self[length - 1] : null; +}; |