style Dashboard

This commit is contained in:
Lieu Le
2019-09-13 11:27:52 +07:00
parent 558fb07261
commit 07322c9084
17151 changed files with 1686347 additions and 103 deletions
Generated Vendored Executable
+12
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
Generated Vendored Executable
+2
View File
@@ -0,0 +1,2 @@
node_modules
coverage
Generated Vendored Executable
+16
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
Generated Vendored Executable
+13
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.
Generated Vendored Executable
+27
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
```
Generated Vendored Executable
+54
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
}
Generated Vendored Executable
+88
View File
@@ -0,0 +1,88 @@
{
"_args": [
[
"is-number-like@1.0.8",
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
]
],
"_from": "is-number-like@1.0.8",
"_id": "is-number-like@1.0.8",
"_inBundle": false,
"_integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==",
"_location": "/is-number-like",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-number-like@1.0.8",
"name": "is-number-like",
"escapedName": "is-number-like",
"rawSpec": "1.0.8",
"saveSpec": null,
"fetchSpec": "1.0.8"
},
"_requiredBy": [
"/portscanner"
],
"_resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz",
"_spec": "1.0.8",
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
"author": {
"name": "Vigour.io",
"email": "dev@vigour.io"
},
"browserify": {
"transform": [
"bubleify"
]
},
"bugs": {
"url": "https://github.com/vigour-io/is-number-like/issues"
},
"contributors": [
{
"name": "Jim De Beer",
"email": "jim@vigour.io"
},
{
"name": "Shawn Inder",
"email": "shawn@vigour.io"
}
],
"dependencies": {
"lodash.isfinite": "^3.3.2"
},
"description": "Checks whether provided parameter looks like a number",
"devDependencies": {
"coveralls": "^2.11.9",
"ducktape": "^1.0.0",
"istanbul": "^0.4.4",
"nodemon": "^1.9.1",
"pre-commit": "^1.1.3",
"standard": "^8.1.0",
"tap-difflet": "0.6.0",
"tape": "4.4.0"
},
"engines": {},
"homepage": "https://github.com/vigour-io/is-number-like#readme",
"keywords": [
"is-number",
"typeof",
"number-like"
],
"license": "ISC",
"main": "lib/index.js",
"name": "is-number-like",
"repository": {
"type": "git",
"url": "git+https://github.com/vigour-io/is-number-like.git"
},
"scripts": {
"cover": "istanbul cover --report none --print detail test/index.js",
"test": "NODE_ENV=test node test | tap-difflet && standard",
"travis": "npm run cover -s && istanbul report lcov && ((cat coverage/lcov.info | coveralls) || exit 0)",
"view-cover": "istanbul report html && open ./coverage/index.html",
"watch": "nodemon test | tap-difflet"
},
"version": "1.0.8"
}
Generated Vendored Executable
+39
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])
})
})
Generated Vendored Executable
+2738
View File
File diff suppressed because it is too large Load Diff