Sha256: 5e9d7b35cbabe058278e4c60f811bf3b91e490c332060568710ad7af429916d9

Contents?: true

Size: 346 Bytes

Versions: 6

Compression:

Stored size: 346 Bytes

Contents

/*!
 * center-align <https://github.com/jonschlinkert/center-align>
 *
 * Copycenter (c) 2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */

'use strict';

var align = require('align-text');

module.exports = function centerAlign(val) {
  return align(val, function (len, longest) {
    return Math.floor((longest - len) / 2);
  });
};

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/center-align/index.js
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/center-align/index.js
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/center-align/index.js
gulp_assets-1.0.0.pre.5 template/node_modules/gulp-sass/node_modules/node-sass/node_modules/sass-graph/node_modules/yargs/node_modules/cliui/node_modules/center-align/index.js
gulp_assets-1.0.0.pre.4 template/node_modules/gulp-sass/node_modules/node-sass/node_modules/sass-graph/node_modules/yargs/node_modules/cliui/node_modules/center-align/index.js
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-sass/node_modules/node-sass/node_modules/sass-graph/node_modules/yargs/node_modules/cliui/node_modules/center-align/index.js