index.js 324 B

12345678910111213141516
  1. /*!
  2. * right-align <https://github.com/jonschlinkert/right-align>
  3. *
  4. * Copyright (c) 2015, Jon Schlinkert.
  5. * Licensed under the MIT License.
  6. */
  7. 'use strict';
  8. var align = require('align-text');
  9. module.exports = function rightAlign(val) {
  10. return align(val, function (len, longest) {
  11. return longest - len;
  12. });
  13. };