前端代码

This commit is contained in:
ChloeChen0423
2025-05-12 16:42:36 +09:00
commit 7c63f2f07b
4531 changed files with 656010 additions and 0 deletions

12
node_modules/is-number-like/.editorconfig generated vendored Normal file
View File

@ -0,0 +1,12 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

2
node_modules/is-number-like/.npmignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
coverage

16
node_modules/is-number-like/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,16 @@
# .travis.yml
language: node_js
git:
depth: 1
node_js:
- '6.3'
- '0.12'
notifications:
email: false
script: npm run travis
deploy:
- provider: npm
email: jim@vigour.io
api_key: ${NPM_TOKEN}
on:
branch: master

13
node_modules/is-number-like/LICENSE generated vendored Normal file
View File

@ -0,0 +1,13 @@
Copyright (c) 2016, Vigour.io
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

27
node_modules/is-number-like/README.md generated vendored Normal file
View File

@ -0,0 +1,27 @@
# is-number-like
<!-- VDOC.badges travis; standard; npm; coveralls -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
[![Build Status](https://travis-ci.org/vigour-io/is-number-like.svg?branch=master)](https://travis-ci.org/vigour-io/is-number-like)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm version](https://badge.fury.io/js/is-number-like.svg)](https://badge.fury.io/js/is-number-like)
[![Coverage Status](https://coveralls.io/repos/github/vigour-io/is-number-like/badge.svg?branch=master)](https://coveralls.io/github/vigour-io/is-number-like?branch=master)
<!-- VDOC END -->
<!-- VDOC.jsdoc isNumberLike -->
<!-- DON'T EDIT THIS SECTION (including comments), INSTEAD RE-RUN `vdoc` TO UPDATE -->
#### var looksLikeNumber = isNumberLike(val)
Checks whether provided parameter looks like a number
- **val** (*any*) - the value to check
- **returns** (*boolean*) looksLikeNumber - `true` if `val` looks like a number, `false` otherwise
<!-- VDOC END -->
```javascript
const isNumberLike = require('is-number-like')
isNumberLike('2') // true
isNumberLike('a') // false
```

54
node_modules/is-number-like/lib/index.js generated vendored Normal file
View File

@ -0,0 +1,54 @@
'use strict'
var isNumber = require('lodash.isfinite')
/**
* @id isNumberLike
* @function isNumberLike
* Checks whether provided parameter looks like a number
* @param {any} val - the value to check
* @returns {boolean} looksLikeNumber - `true` if `val` looks like a number, `false` otherwise
*/
module.exports = function isNumberLike (val) {
// fail
if (val === null || val === void 0 || val === false) {
return false
}
if (typeof val === 'function' || val instanceof Array) {
return false
}
var length = val.length
if (!length) {
return isNumber(val)
}
var i = 0
// charAt is faster in v8
if (val.charAt(0) === '-') {
if (length === 1) {
// fail do it
return false
}
i = 1
}
var foundE = false
var foundPeriod = false
for (; i < length; i++) {
var c = val.charAt(i)
// bit range is outside number range
if ((c <= '/' || c >= ':')) {
if (c === 'e') {
if (foundE) {
return false
}
foundE = true
} else if (c === '.') {
if (foundPeriod) {
return false
}
foundPeriod = true
} else {
return false
}
}
}
return true
}

51
node_modules/is-number-like/package.json generated vendored Normal file
View File

@ -0,0 +1,51 @@
{
"name": "is-number-like",
"version": "1.0.8",
"description": "Checks whether provided parameter looks like a number",
"main": "lib/index.js",
"scripts": {
"test": "NODE_ENV=test node test | tap-difflet && standard",
"cover": "istanbul cover --report none --print detail test/index.js",
"view-cover": "istanbul report html && open ./coverage/index.html",
"watch": "nodemon test | tap-difflet",
"travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || exit 0)"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vigour-io/is-number-like.git"
},
"keywords": [
"is-number",
"typeof",
"number-like"
],
"author": "Vigour.io <dev@vigour.io>",
"license": "ISC",
"bugs": {
"url": "https://github.com/vigour-io/is-number-like/issues"
},
"homepage": "https://github.com/vigour-io/is-number-like#readme",
"contributors": [
"Jim De Beer <jim@vigour.io>",
"Shawn Inder <shawn@vigour.io>"
],
"dependencies": {
"lodash.isfinite": "^3.3.2"
},
"engines": {},
"devDependencies": {
"ducktape": "^1.0.0",
"coveralls": "^2.11.9",
"nodemon": "^1.9.1",
"pre-commit": "^1.1.3",
"istanbul": "^0.4.4",
"standard": "^8.1.0",
"tape": "4.4.0",
"tap-difflet": "0.6.0"
},
"browserify": {
"transform": [
"bubleify"
]
}
}

39
node_modules/is-number-like/test/index.js generated vendored Normal file
View File

@ -0,0 +1,39 @@
'use strict'
var test = require('tape')
var isNumberLike = require('..')
var testCases = [
// ['number', expectedResult]
[0, true],
['0', true],
[1.1, true],
['1.1', true],
[-1.1, true],
['-1.1', true],
['1.1.1', false],
[1.1e2, true],
['1.1e2', true],
['1e2e3', false],
['-', false],
[null, false],
['22221.2.e.34442', false],
[ '111a111', false ],
[[], false],
[[''], false],
[Number.EPSILON, true],
[Number.MAX_SAFE_INTEGER, true],
[Number.MAX_VALUE, true],
[Number.MIN_SAFE_INTEGER, true],
[Number.MIN_VALUE, true],
[Number.NaN, false],
[Number.NEGATIVE_INFINITY, false],
[Number.POSITIVE_INFINITY, false],
[function (arg1, arg2) {}, false]
]
test('isNumberLike', function (t) {
t.plan(testCases.length)
testCases.forEach(function (item) {
t.equals(isNumberLike(item[0]), item[1], 'isNumberLike(' + JSON.stringify(item[0]) + ') === ' + item[1])
})
})

2738
node_modules/is-number-like/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff