first commit
This commit is contained in:
8
build/node_modules/string-length/index.js
generated
vendored
Normal file
8
build/node_modules/string-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var stripAnsi = require('strip-ansi');
|
||||
|
||||
module.exports = function (str) {
|
||||
var reAstral = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||||
|
||||
return stripAnsi(str).replace(reAstral, ' ').length;
|
||||
};
|
||||
21
build/node_modules/string-length/license
generated
vendored
Normal file
21
build/node_modules/string-length/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
72
build/node_modules/string-length/package.json
generated
vendored
Normal file
72
build/node_modules/string-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"_from": "string-length@^1.0.0",
|
||||
"_id": "string-length@1.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=",
|
||||
"_location": "/string-length",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "string-length@^1.0.0",
|
||||
"name": "string-length",
|
||||
"escapedName": "string-length",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/http2-push-manifest/update-notifier"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz",
|
||||
"_shasum": "56970fb1c38558e9e70b728bf3de269ac45adfac",
|
||||
"_spec": "string-length@^1.0.0",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build/node_modules/http2-push-manifest/node_modules/update-notifier",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/string-length/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"strip-ansi": "^3.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/string-length#readme",
|
||||
"keywords": [
|
||||
"unicode",
|
||||
"string",
|
||||
"str",
|
||||
"length",
|
||||
"astral",
|
||||
"symbol",
|
||||
"surrogates",
|
||||
"codepoints",
|
||||
"ansi",
|
||||
"escape",
|
||||
"codes"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "string-length",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/string-length.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
||||
31
build/node_modules/string-length/readme.md
generated
vendored
Normal file
31
build/node_modules/string-length/readme.md
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# string-length [](https://travis-ci.org/sindresorhus/string-length)
|
||||
|
||||
> Get the real length of a string - by correctly counting astral symbols and ignoring [ansi escape codes](https://github.com/sindresorhus/strip-ansi)
|
||||
|
||||
`String#length` errornously counts [astral symbols](http://www.tlg.uci.edu/~opoudjis/unicode/unicode_astral.html) as two characters.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save string-length
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
'🐴'.length;
|
||||
//=> 2
|
||||
|
||||
stringLength('🐴');
|
||||
//=> 1
|
||||
|
||||
stringLength('\u001b[1municorn\u001b[22m');
|
||||
//=> 7
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user