mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
# add dist
This commit is contained in:
20
ng2-components/ng2-alfresco-documentslist/dist/node_modules/indent-string/index.js
generated
vendored
Normal file
20
ng2-components/ng2-alfresco-documentslist/dist/node_modules/indent-string/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
var repeating = require('repeating');
|
||||
|
||||
module.exports = function (str, indent, count) {
|
||||
if (typeof str !== 'string' || typeof indent !== 'string') {
|
||||
throw new TypeError('`string` and `indent` should be strings');
|
||||
}
|
||||
|
||||
if (count != null && typeof count !== 'number') {
|
||||
throw new TypeError('`count` should be a number');
|
||||
}
|
||||
|
||||
if (count === 0) {
|
||||
return str;
|
||||
}
|
||||
|
||||
indent = count > 1 ? repeating(indent, count) : indent;
|
||||
|
||||
return str.replace(/^(?!\s*$)/mg, indent);
|
||||
};
|
Reference in New Issue
Block a user