初始化

This commit is contained in:
yziiy
2025-08-11 11:06:07 +08:00
parent 083bc37c00
commit 5607d11395
19772 changed files with 3108723 additions and 18 deletions

19
uni_modules/UniDevTools/node_modules/dom-walk/LICENCE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2012 Raynos.
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.

View File

@@ -0,0 +1,2 @@
run:
./node_modules/.bin/browserify-server --cwd example

View File

@@ -0,0 +1,23 @@
# dom-walk
iteratively walk a DOM node
## Example
``` js
var walk = require("dom-walk")
walk(document.body.childNodes, function (node) {
console.log("node", node)
})
```
## Installation
`npm install dom-walk`
## Contributors
- Raynos
## MIT Licenced

View File

@@ -0,0 +1,5 @@
var walk = require("../index")
walk(document, function (node) {
console.log("node", node)
})

24
uni_modules/UniDevTools/node_modules/dom-walk/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
var slice = Array.prototype.slice
module.exports = iterativelyWalk
function iterativelyWalk(nodes, cb) {
if (!('length' in nodes)) {
nodes = [nodes]
}
nodes = slice.call(nodes)
while(nodes.length) {
var node = nodes.shift(),
ret = cb(node)
if (ret) {
return ret
}
if (node.childNodes && node.childNodes.length) {
nodes = slice.call(node.childNodes).concat(nodes)
}
}
}

View File

@@ -0,0 +1,32 @@
{
"name": "dom-walk",
"version": "0.1.2",
"description": "iteratively walk a DOM node",
"keywords": [],
"author": "Raynos <raynos2@gmail.com>",
"repository": "git://github.com/Raynos/dom-walk.git",
"main": "index",
"homepage": "https://github.com/Raynos/dom-walk",
"contributors": [
{
"name": "Jake Verbaten"
}
],
"bugs": {
"url": "https://github.com/Raynos/dom-walk/issues",
"email": "raynos2@gmail.com"
},
"dependencies": {},
"devDependencies": {
"budo": "11.6.3"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/Raynos/dom-walk/raw/master/LICENSE"
}
],
"scripts": {
"example": "budo example/index.js"
}
}