Simulator first commit
This commit is contained in:
2
node_modules/isnumber/.npmignore
generated
vendored
Normal file
2
node_modules/isnumber/.npmignore
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
.tern-port
|
9
node_modules/isnumber/LICENSE
generated
vendored
Normal file
9
node_modules/isnumber/LICENSE
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) Bryce B. Baril <bryce@ravenwall.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.
|
25
node_modules/isnumber/README.md
generated
vendored
Normal file
25
node_modules/isnumber/README.md
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
isNumber
|
||||
========
|
||||
|
||||
[](https://nodei.co/npm/isnumber/)
|
||||
|
||||
`isNumber` is a super tiny module that provides a test to see if a value is a finite number.
|
||||
|
||||
By super tiny, I mean like a single line -- however, I tend to use this somewhat frequently, so module it is!
|
||||
|
||||
```js
|
||||
var isNumber = require("isnumber")
|
||||
|
||||
isNumber(13) // true
|
||||
isNumber("1241.12") // true
|
||||
isNumber(0xff) // true
|
||||
|
||||
isNumber(Infinity) // false
|
||||
isNumber("cat") // false
|
||||
isNumber({foo: "bar"}) // false
|
||||
```
|
||||
|
||||
LICENSE
|
||||
=======
|
||||
|
||||
MIT
|
10
node_modules/isnumber/index.js
generated
vendored
Normal file
10
node_modules/isnumber/index.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
module.exports = isNumber
|
||||
|
||||
/**
|
||||
* Determine if something is a non-infinite javascript number.
|
||||
* @param {Number} n A (potential) number to see if it is a number.
|
||||
* @return {Boolean} True for non-infinite numbers, false for all else.
|
||||
*/
|
||||
function isNumber(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
59
node_modules/isnumber/package.json
generated
vendored
Normal file
59
node_modules/isnumber/package.json
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "isnumber@~1.0.0",
|
||||
"_id": "isnumber@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Dj+XWbWB2Z3YUIbw7Cp0kJz63QE=",
|
||||
"_location": "/isnumber",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "isnumber@~1.0.0",
|
||||
"name": "isnumber",
|
||||
"escapedName": "isnumber",
|
||||
"rawSpec": "~1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/stats-lite"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/isnumber/-/isnumber-1.0.0.tgz",
|
||||
"_shasum": "0e3f9759b581d99dd85086f0ec2a74909cfadd01",
|
||||
"_spec": "isnumber@~1.0.0",
|
||||
"_where": "/home/sergiu/linx-audio-simulator/node_modules/stats-lite",
|
||||
"author": {
|
||||
"name": "Bryce B. Baril"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/brycebaril/node-isnumber/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "A simple test to see if a value is a non-infinite number.",
|
||||
"devDependencies": {
|
||||
"tape": "~1.0.4"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"homepage": "https://github.com/brycebaril/node-isnumber#readme",
|
||||
"keywords": [
|
||||
"number",
|
||||
"test",
|
||||
"isNumber",
|
||||
"finite"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "isnumber",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/brycebaril/node-isnumber.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
20
node_modules/isnumber/test/index.js
generated
vendored
Normal file
20
node_modules/isnumber/test/index.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
var test = require("tape").test
|
||||
|
||||
var isNumber = require("../")
|
||||
|
||||
test("numbers", function (t) {
|
||||
var ok = [0, -1231.21, 200, Math.pow(2, 53), Number.MAX_VALUE, Number.MIN_VALUE, 351351.13515151,
|
||||
031, 0xff, "121", "122.1251"]
|
||||
var notOk = [null, undefined, "cat", "dog", {}, {foo: "bar"}, [1,2,3], new Buffer("abc"),
|
||||
Infinity, function () {}]
|
||||
|
||||
ok.forEach(function (n) {
|
||||
t.ok(isNumber(n), "This is in fact a number.")
|
||||
})
|
||||
|
||||
notOk.forEach(function (o) {
|
||||
t.notOk(isNumber(o), "This is not a number.")
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
Reference in New Issue
Block a user