项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

17 line
324 B

  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. };