first commit

This commit is contained in:
jefferyzhao
2025-07-31 17:44:12 +08:00
commit b9bdc8598b
42390 changed files with 4467935 additions and 0 deletions

40
node_modules/location/README.md generated vendored Normal file
View File

@ -0,0 +1,40 @@
location
====
A mock location object for unit tests and such and to maintain compatibility between `Ender.JS` and `Node.JS`
For best results, create a `location.config.js` in the working directory of your app that returns a location object that should be used.
Current Implementation
---
var fs = require('fs')
, location
, defaultLocation
;
defaultLocation = {
"origin": "http://localhost:3000",
"pathname": "/",
"host": "localhost:3000",
"hostname": "localhost",
"port": "3000",
"search": "",
"hash": "#home",
"href": "http://localhost:3000/#home",
"protocol": "http:"
};
try {
// TODO try all from `__dirname` to `/` before giving up
location = fs.readFileSync('./location.config.js');
} catch(e) {
location = defaultLocation;
}
module.exports = location;
TODO
---
Look for `__dirname + "location.config.js"` and then look up one directory at each failure before finally giving up and using the default object.

28
node_modules/location/location.js generated vendored Normal file
View File

@ -0,0 +1,28 @@
(function () {
"use strict";
var fs = require('fs')
, location
, defaultLocation
;
defaultLocation = {
"origin": "http://localhost:3000",
"pathname": "/",
"host": "localhost:3000",
"hostname": "localhost",
"port": "3000",
"search": "",
"hash": "#home",
"href": "http://localhost:3000/#home",
"protocol": "http:"
};
try {
location = fs.readFileSync('./location.config.js');
} catch(e) {
location = defaultLocation;
}
module.exports = location;
}());

16
node_modules/location/package.json generated vendored Normal file
View File

@ -0,0 +1,16 @@
{
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info)",
"name": "location",
"description": "A Browser-esque location object",
"version": "0.0.1",
"repository": {
"type": "git",
"url": "git://github.com/coolaj86/node-location.git"
},
"main": "location.js",
"engines": {
"node": ">= 0.2.0"
},
"dependencies": {},
"devDependencies": {}
}