This commit is contained in:
落日晚风
2023-12-13 11:25:22 +08:00
parent 7c2ab0b7ad
commit cff33ad7d1
6370 changed files with 378844 additions and 82245 deletions
+2
View File
@@ -0,0 +1,2 @@
components
build
+11
View File
@@ -0,0 +1,11 @@
build: components index.js
@component build
components:
@Component install
clean:
rm -fr build components template.js
.PHONY: clean
+15
View File
@@ -0,0 +1,15 @@
# indexOf
Lame indexOf thing, thanks microsoft
## Example
```js
var index = require('indexof');
index(arr, obj);
```
## License
MIT
+10
View File
@@ -0,0 +1,10 @@
{
"name": "indexof",
"description": "Microsoft sucks",
"version": "0.0.1",
"keywords": ["index", "array", "indexOf"],
"dependencies": {},
"scripts": [
"index.js"
]
}
+10
View File
@@ -0,0 +1,10 @@
var indexOf = [].indexOf;
module.exports = function(arr, obj){
if (indexOf) return arr.indexOf(obj);
for (var i = 0; i < arr.length; ++i) {
if (arr[i] === obj) return i;
}
return -1;
};
+12
View File
@@ -0,0 +1,12 @@
{
"name": "indexof",
"description": "Microsoft sucks",
"version": "0.0.1",
"keywords": ["index", "array", "indexOf"],
"dependencies": {},
"component": {
"scripts": {
"indexof/index.js": "index.js"
}
}
}