style Dashboard

This commit is contained in:
Lieu Le
2019-09-13 11:27:52 +07:00
parent 558fb07261
commit 07322c9084
17151 changed files with 1686347 additions and 103 deletions
Generated Vendored Executable
+33
View File
@@ -0,0 +1,33 @@
# find-index
finds an item in an array matching a predicate function,
and returns its index
fast both when `thisArg` is used and also when it isn't: [jsPerf](http://jsperf.com/array-prototype-findindex-shims)
### usage
```bash
npm install find-index
```
```js
findIndex = require('find-index')
findLastIndex = require('find-index/last')
```
findIndex(array, callback[, thisArg])
findLastIndex(array, callback[, thisArg])
Parameters:
array
The array to operate on.
callback
Function to execute on each value in the array, taking three arguments:
element
The current element being processed in the array.
index
The index of the current element being processed in the array.
array
The array findIndex was called upon.
thisArg
Object to use as this when executing callback.
based on [array-findindex](https://www.npmjs.org/package/array-findindex)
Generated Vendored Executable
+26
View File
@@ -0,0 +1,26 @@
function findIndex(array, predicate, self) {
var len = array.length;
var i;
if (len === 0) return -1;
if (typeof predicate !== 'function') {
throw new TypeError(predicate + ' must be a function');
}
if (self) {
for (i = 0; i < len; i++) {
if (predicate.call(self, array[i], i, array)) {
return i;
}
}
} else {
for (i = 0; i < len; i++) {
if (predicate(array[i], i, array)) {
return i;
}
}
}
return -1;
}
module.exports = findIndex
Generated Vendored Executable
+26
View File
@@ -0,0 +1,26 @@
function findLastIndex(array, predicate, self) {
var len = array.length;
var i;
if (len === 0) return -1;
if (typeof predicate !== 'function') {
throw new TypeError(predicate + ' must be a function');
}
if (self) {
for (i = len - 1; i >= 0; i--) {
if (predicate.call(self, array[i], i, array)) {
return i;
}
}
} else {
for (i = len - 1; i >= 0; i--) {
if (predicate(array[i], i, array)) {
return i;
}
}
}
return -1;
}
module.exports = findLastIndex
Generated Vendored Executable
+59
View File
@@ -0,0 +1,59 @@
{
"_args": [
[
"find-index@0.1.1",
"/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome"
]
],
"_from": "find-index@0.1.1",
"_id": "find-index@0.1.1",
"_inBundle": false,
"_integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=",
"_location": "/find-index",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "find-index@0.1.1",
"name": "find-index",
"escapedName": "find-index",
"rawSpec": "0.1.1",
"saveSpec": null,
"fetchSpec": "0.1.1"
},
"_requiredBy": [
"/glob2base"
],
"_resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz",
"_spec": "0.1.1",
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome",
"author": {
"name": "James Friend",
"email": "james@jsdf.co",
"url": "http://jsdf.co/"
},
"bugs": {
"url": "https://github.com/jsdf/find-index/issues"
},
"description": "finds an item in an array matching a predicate function, and returns its index",
"files": [
"index.js",
"last.js"
],
"homepage": "https://github.com/jsdf/find-index",
"keywords": [
"array",
"findindex"
],
"license": "MIT",
"main": "index.js",
"name": "find-index",
"repository": {
"type": "git",
"url": "git://github.com/jsdf/find-index.git"
},
"scripts": {
"test": "node test/test"
},
"version": "0.1.1"
}