mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-19 04:17:20 +00:00
push all website files
This commit is contained in:
53
website/functions/node_modules/power-assert-util-string-width/README.md
generated
vendored
Normal file
53
website/functions/node_modules/power-assert-util-string-width/README.md
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
[![power-assert][power-assert-banner]][power-assert-url]
|
||||
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![License][license-image]][license-url]
|
||||
|
||||
|
||||
Calculates width of given string. Treat ambiguous-width characters as fullwidth (= `2`) by default.
|
||||
|
||||
|
||||
USAGE
|
||||
---------------------------------------
|
||||
|
||||
```js
|
||||
var stringWidth = require('power-assert-util-string-width');
|
||||
stringWidth('abcde'); //=> 5
|
||||
stringWidth('あいうえお'); //=> 10
|
||||
stringWidth('アイウエオ'); //=> 5
|
||||
stringWidth('※脚注'); //=> 6
|
||||
// stringWidth.narrow treats ambiguous-width characters as narrow (= `1`)
|
||||
stringWidth.narrow('※脚注'); //=> 5
|
||||
```
|
||||
|
||||
|
||||
INSTALL
|
||||
---------------------------------------
|
||||
|
||||
```sh
|
||||
$ npm install --save-dev power-assert-util-string-width
|
||||
```
|
||||
|
||||
|
||||
AUTHOR
|
||||
---------------------------------------
|
||||
* [Takuto Wada](https://github.com/twada)
|
||||
|
||||
|
||||
LICENSE
|
||||
---------------------------------------
|
||||
Licensed under the [MIT](https://github.com/twada/power-assert-runtime/blob/master/LICENSE) license.
|
||||
|
||||
|
||||
[power-assert-url]: https://github.com/power-assert-js/power-assert
|
||||
[power-assert-banner]: https://raw.githubusercontent.com/power-assert-js/power-assert-js-logo/master/banner/banner-official-fullcolor.png
|
||||
|
||||
[travis-url]: https://travis-ci.org/twada/power-assert-runtime
|
||||
[travis-image]: https://secure.travis-ci.org/twada/power-assert-runtime.svg?branch=master
|
||||
|
||||
[npm-url]: https://npmjs.org/package/power-assert-util-string-width
|
||||
[npm-image]: https://badge.fury.io/js/power-assert-util-string-width.svg
|
||||
|
||||
[license-url]: https://github.com/twada/power-assert-runtime/blob/master/LICENSE
|
||||
[license-image]: https://img.shields.io/badge/license-MIT-brightgreen.svg
|
30
website/functions/node_modules/power-assert-util-string-width/index.js
generated
vendored
Normal file
30
website/functions/node_modules/power-assert-util-string-width/index.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
var eaw = require('eastasianwidth');
|
||||
|
||||
function stringWidth (ambiguousCharWidth) {
|
||||
return function widthOf (str) {
|
||||
var i, code, width = 0;
|
||||
for(i = 0; i < str.length; i+=1) {
|
||||
code = eaw.eastAsianWidth(str.charAt(i));
|
||||
switch(code) {
|
||||
case 'F':
|
||||
case 'W':
|
||||
width += 2;
|
||||
break;
|
||||
case 'H':
|
||||
case 'Na':
|
||||
case 'N':
|
||||
width += 1;
|
||||
break;
|
||||
case 'A':
|
||||
width += ambiguousCharWidth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return width;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = stringWidth(2);
|
||||
module.exports.narrow = stringWidth(1);
|
64
website/functions/node_modules/power-assert-util-string-width/package.json
generated
vendored
Normal file
64
website/functions/node_modules/power-assert-util-string-width/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"_from": "power-assert-util-string-width@^1.2.0",
|
||||
"_id": "power-assert-util-string-width@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==",
|
||||
"_location": "/power-assert-util-string-width",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "power-assert-util-string-width@^1.2.0",
|
||||
"name": "power-assert-util-string-width",
|
||||
"escapedName": "power-assert-util-string-width",
|
||||
"rawSpec": "^1.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/power-assert-renderer-assertion",
|
||||
"/power-assert-renderer-diagram"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz",
|
||||
"_shasum": "6e06d5e3581bb876c5d377c53109fffa95bd91a0",
|
||||
"_spec": "power-assert-util-string-width@^1.2.0",
|
||||
"_where": "C:\\Users\\jlevi\\Downloads\\tr2022-strategy-master\\tr2022-strategy-master\\data analysis\\functions\\node_modules\\power-assert-renderer-assertion",
|
||||
"author": {
|
||||
"name": "Takuto Wada",
|
||||
"email": "takuto.wada@gmail.com",
|
||||
"url": "https://github.com/twada"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/twada/power-assert-runtime/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"eastasianwidth": "^0.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "calculates width of given string",
|
||||
"devDependencies": {
|
||||
"mocha": "^5.0.0"
|
||||
},
|
||||
"files": [
|
||||
"README.md",
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/twada/power-assert-runtime",
|
||||
"keywords": [
|
||||
"string",
|
||||
"unicode",
|
||||
"width"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "power-assert-util-string-width",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/twada/power-assert-runtime.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
Reference in New Issue
Block a user