]> git.r.bdr.sh - rbdr/dotfiles/blob
223bd82b0f1a977d1d5561c4252defdb881ebbc1
[rbdr/dotfiles] /
1 'use strict';
2
3 var repeat = require('./repeat')
4
5 , replace = String.prototype.replace
6 , re = /(\r\n|[\n\r\u2028\u2029])([\u0000-\u0009\u000b-\uffff]+)/g;
7
8 module.exports = function (indent/*, count*/) {
9 var count = arguments[1];
10 indent = repeat.call(String(indent), (count == null) ? 1 : count);
11 return indent + replace.call(this, re, '$1' + indent + '$2');
12 };