aboutsummaryrefslogtreecommitdiff
path: root/node_modules/indexof
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/indexof
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/indexof')
-rw-r--r--node_modules/indexof/.npmignore2
-rw-r--r--node_modules/indexof/Makefile11
-rw-r--r--node_modules/indexof/Readme.md15
-rw-r--r--node_modules/indexof/component.json10
-rw-r--r--node_modules/indexof/index.js10
-rw-r--r--node_modules/indexof/package.json12
6 files changed, 60 insertions, 0 deletions
diff --git a/node_modules/indexof/.npmignore b/node_modules/indexof/.npmignore
new file mode 100644
index 00000000..48a2e246
--- /dev/null
+++ b/node_modules/indexof/.npmignore
@@ -0,0 +1,2 @@
+components
+build
diff --git a/node_modules/indexof/Makefile b/node_modules/indexof/Makefile
new file mode 100644
index 00000000..3f6119d2
--- /dev/null
+++ b/node_modules/indexof/Makefile
@@ -0,0 +1,11 @@
+
+build: components index.js
+ @component build
+
+components:
+ @Component install
+
+clean:
+ rm -fr build components template.js
+
+.PHONY: clean
diff --git a/node_modules/indexof/Readme.md b/node_modules/indexof/Readme.md
new file mode 100644
index 00000000..99c8dfc8
--- /dev/null
+++ b/node_modules/indexof/Readme.md
@@ -0,0 +1,15 @@
+
+# indexOf
+
+ Lame indexOf thing, thanks microsoft
+
+## Example
+
+```js
+var index = require('indexof');
+index(arr, obj);
+```
+
+## License
+
+ MIT \ No newline at end of file
diff --git a/node_modules/indexof/component.json b/node_modules/indexof/component.json
new file mode 100644
index 00000000..e3430d75
--- /dev/null
+++ b/node_modules/indexof/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "indexof",
+ "description": "Microsoft sucks",
+ "version": "0.0.1",
+ "keywords": ["index", "array", "indexOf"],
+ "dependencies": {},
+ "scripts": [
+ "index.js"
+ ]
+} \ No newline at end of file
diff --git a/node_modules/indexof/index.js b/node_modules/indexof/index.js
new file mode 100644
index 00000000..9d9667b2
--- /dev/null
+++ b/node_modules/indexof/index.js
@@ -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;
+}; \ No newline at end of file
diff --git a/node_modules/indexof/package.json b/node_modules/indexof/package.json
new file mode 100644
index 00000000..79d009f4
--- /dev/null
+++ b/node_modules/indexof/package.json
@@ -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"
+ }
+ }
+} \ No newline at end of file