Add node modules and compiled JavaScript from main (#57)
Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
committed by
GitHub
parent
d893f27da9
commit
7f7e5ba5ea
13
node_modules/string-length/index.js
generated
vendored
Normal file
13
node_modules/string-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
const stripAnsi = require('strip-ansi');
|
||||
const charRegex = require('char-regex');
|
||||
|
||||
const stringLength = string => {
|
||||
if (string === '') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return stripAnsi(string).match(charRegex()).length;
|
||||
};
|
||||
|
||||
module.exports = stringLength;
|
||||
Reference in New Issue
Block a user