added old data
This commit is contained in:
14
project3/node_modules/date-now/.npmignore
generated
vendored
Normal file
14
project3/node_modules/date-now/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
.DS_Store
|
||||
.monitor
|
||||
.*.swp
|
||||
.nodemonignore
|
||||
releases
|
||||
*.log
|
||||
*.err
|
||||
fleet.json
|
||||
public/browserify
|
||||
bin/*.json
|
||||
.bin
|
||||
build
|
||||
compile
|
||||
.lock-wscript
|
14
project3/node_modules/date-now/.testem.json
generated
vendored
Normal file
14
project3/node_modules/date-now/.testem.json
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"launchers": {
|
||||
"node": {
|
||||
"command": "npm test"
|
||||
}
|
||||
},
|
||||
"src_files": [
|
||||
"./**/*.js"
|
||||
],
|
||||
"before_tests": "npm run build",
|
||||
"on_exit": "rm test/static/bundle.js",
|
||||
"test_page": "test/static/index.html",
|
||||
"launch_in_dev": ["node", "phantomjs"]
|
||||
}
|
4
project3/node_modules/date-now/.travis.yml
generated
vendored
Normal file
4
project3/node_modules/date-now/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
- 0.9
|
19
project3/node_modules/date-now/LICENCE
generated
vendored
Normal file
19
project3/node_modules/date-now/LICENCE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2012 Colingo.
|
||||
|
||||
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.
|
45
project3/node_modules/date-now/README.md
generated
vendored
Normal file
45
project3/node_modules/date-now/README.md
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# date-now
|
||||
|
||||
[![build status][1]][2]
|
||||
|
||||
[![browser support][3]][4]
|
||||
|
||||
A requirable version of Date.now()
|
||||
|
||||
Use-case is to be able to mock out Date.now() using require interception.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var now = require("date-now")
|
||||
|
||||
var ts = now()
|
||||
var ts2 = Date.now()
|
||||
assert.equal(ts, ts2)
|
||||
```
|
||||
|
||||
## example of seed
|
||||
|
||||
```
|
||||
var now = require("date-now/seed")(timeStampFromServer)
|
||||
|
||||
// ts is in "sync" with the seed value from the server
|
||||
// useful if your users have their local time being a few minutes
|
||||
// out of your server time.
|
||||
var ts = now()
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`npm install date-now`
|
||||
|
||||
## Contributors
|
||||
|
||||
- Raynos
|
||||
|
||||
## MIT Licenced
|
||||
|
||||
[1]: https://secure.travis-ci.org/Colingo/date-now.png
|
||||
[2]: http://travis-ci.org/Colingo/date-now
|
||||
[3]: http://ci.testling.com/Colingo/date-now.png
|
||||
[4]: http://ci.testling.com/Colingo/date-now
|
5
project3/node_modules/date-now/index.js
generated
vendored
Normal file
5
project3/node_modules/date-now/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = now
|
||||
|
||||
function now() {
|
||||
return new Date().getTime()
|
||||
}
|
94
project3/node_modules/date-now/package.json
generated
vendored
Normal file
94
project3/node_modules/date-now/package.json
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"_from": "date-now@^0.1.4",
|
||||
"_id": "date-now@0.1.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
||||
"_location": "/date-now",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "date-now@^0.1.4",
|
||||
"name": "date-now",
|
||||
"escapedName": "date-now",
|
||||
"rawSpec": "^0.1.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/console-browserify"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
|
||||
"_shasum": "eaf439fd4d4848ad74e5cc7dbef200672b9e345b",
|
||||
"_spec": "date-now@^0.1.4",
|
||||
"_where": "/home/massiveatoms/Desktop/cs142/project3/node_modules/console-browserify",
|
||||
"author": {
|
||||
"name": "Raynos",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Colingo/date-now/issues",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Artem Shoobovych"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "A requirable version of Date.now()",
|
||||
"devDependencies": {
|
||||
"browserify": "https://github.com/raynos/node-browserify/tarball/master",
|
||||
"tape": "~0.2.2",
|
||||
"testem": "~0.2.52"
|
||||
},
|
||||
"homepage": "https://github.com/Colingo/date-now",
|
||||
"keywords": [],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/Colingo/date-now/raw/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "index",
|
||||
"name": "date-now",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Colingo/date-now.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "browserify test/index.js -o test/static/bundle.js",
|
||||
"test": "node ./test",
|
||||
"testem": "testem"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"ie": [
|
||||
"8",
|
||||
"9",
|
||||
"10"
|
||||
],
|
||||
"firefox": [
|
||||
"16",
|
||||
"17",
|
||||
"nightly"
|
||||
],
|
||||
"chrome": [
|
||||
"22",
|
||||
"23",
|
||||
"canary"
|
||||
],
|
||||
"opera": [
|
||||
"12",
|
||||
"next"
|
||||
],
|
||||
"safari": [
|
||||
"5.1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "0.1.4"
|
||||
}
|
16
project3/node_modules/date-now/seed.js
generated
vendored
Normal file
16
project3/node_modules/date-now/seed.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
var now = require("./index")
|
||||
|
||||
module.exports = seeded
|
||||
|
||||
/* Returns a Date.now() like function that's in sync with
|
||||
the seed value
|
||||
*/
|
||||
function seeded(seed) {
|
||||
var current = now()
|
||||
|
||||
return time
|
||||
|
||||
function time() {
|
||||
return seed + (now() - current)
|
||||
}
|
||||
}
|
28
project3/node_modules/date-now/test/index.js
generated
vendored
Normal file
28
project3/node_modules/date-now/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
var test = require("tape")
|
||||
var setTimeout = require("timers").setTimeout
|
||||
|
||||
var now = require("../index")
|
||||
var seeded = require("../seed")
|
||||
|
||||
test("date", function (assert) {
|
||||
var ts = now()
|
||||
var ts2 = Date.now()
|
||||
assert.equal(ts, ts2)
|
||||
assert.end()
|
||||
})
|
||||
|
||||
test("seeded", function (assert) {
|
||||
var time = seeded(40)
|
||||
var ts = time()
|
||||
|
||||
within(assert, time(), 40, 5)
|
||||
setTimeout(function () {
|
||||
within(assert, time(), 90, 10)
|
||||
assert.end()
|
||||
}, 50)
|
||||
})
|
||||
|
||||
function within(assert, a, b, offset) {
|
||||
assert.ok(a + offset > b)
|
||||
assert.ok(a - offset < b)
|
||||
}
|
10
project3/node_modules/date-now/test/static/index.html
generated
vendored
Normal file
10
project3/node_modules/date-now/test/static/index.html
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>TAPE Example</title>
|
||||
<script src="/testem.js"></script>
|
||||
<script src="bundle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user