Skip to content

Commit

Permalink
Remove superfluous inline docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 4, 2016
1 parent 2a9e73f commit 737fdc0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
21 changes: 1 addition & 20 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module collapse-white-space
* @fileoverview Replace multiple white-space characters
* with a single space.
*/

'use strict';

/* Expose. */
module.exports = collapse;

/**
* Replace multiple white-space characters with a single space.
*
* @example
* collapse(' \t\nbar \nbaz\t'); // ' bar baz '
*
* @param {string} value - Value with uncollapsed white-space,
* coerced to string.
* @return {string} - Value with collapsed white-space.
*/
/* collapse(' \t\nbar \nbaz\t'); // ' bar baz ' */
function collapse(value) {
return String(value).replace(/\s+/g, ' ');
}
10 changes: 0 additions & 10 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module collapse-white-space
* @fileoverview Test suite for `collapse-white-space`.
*/

'use strict';

/* Dependencies. */
var test = require('tape');
var collapse = require('./index.js');

/* Tests. */
test('collapseWhiteSpace(value)', function (t) {
t.equal(collapse(true), 'true', 'should coerce to string');

Expand Down

0 comments on commit 737fdc0

Please sign in to comment.