mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Initial commit
This commit is contained in:
1
node_modules/indexes-of/.npmignore
generated
vendored
Normal file
1
node_modules/indexes-of/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules/
|
22
node_modules/indexes-of/LICENSE
generated
vendored
Normal file
22
node_modules/indexes-of/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2013 Dominic Tarr
|
||||
|
||||
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.
|
24
node_modules/indexes-of/README.md
generated
vendored
Normal file
24
node_modules/indexes-of/README.md
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# indexes-of
|
||||
|
||||
like Array/String#indexOf but return all the indexes in an array.
|
||||
|
||||
``` js
|
||||
var indexesOf = require('indexes-of')
|
||||
|
||||
var twosIndexes = indexesOf([1, 2, 3, 4, 5, 4, 3, 2, 1], 2)
|
||||
|
||||
console.log(twosIndexes)
|
||||
|
||||
// [1, 7]
|
||||
|
||||
```
|
||||
|
||||
# Haiku
|
||||
|
||||
* A 5 line module.
|
||||
* But the tests are 40 lines.
|
||||
* npm publish.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
6
node_modules/indexes-of/index.js
generated
vendored
Normal file
6
node_modules/indexes-of/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = function (ary, item) {
|
||||
var i = -1, indexes = []
|
||||
while((i = ary.indexOf(item, i + 1)) !== -1)
|
||||
indexes.push(i)
|
||||
return indexes
|
||||
}
|
73
node_modules/indexes-of/package.json
generated
vendored
Normal file
73
node_modules/indexes-of/package.json
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"indexes-of@^1.0.1",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/postcss-selector-parser"
|
||||
]
|
||||
],
|
||||
"_from": "indexes-of@>=1.0.1 <2.0.0",
|
||||
"_id": "indexes-of@1.0.1",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/indexes-of",
|
||||
"_npmUser": {
|
||||
"email": "dominic.tarr@gmail.com",
|
||||
"name": "dominictarr"
|
||||
},
|
||||
"_npmVersion": "1.3.11",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "indexes-of",
|
||||
"raw": "indexes-of@^1.0.1",
|
||||
"rawSpec": "^1.0.1",
|
||||
"scope": null,
|
||||
"spec": ">=1.0.1 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/postcss-selector-parser"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz",
|
||||
"_shasum": "f30f716c8e2bd346c7b67d3df3915566a7c05607",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "indexes-of@^1.0.1",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/postcss-selector-parser",
|
||||
"author": {
|
||||
"email": "dominic.tarr@gmail.com",
|
||||
"name": "Dominic Tarr",
|
||||
"url": "dominictarr.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/dominictarr/indexes-of/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "line String/Array#indexOf but return all the indexes in an array",
|
||||
"devDependencies": {
|
||||
"tape": "~2.1.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f30f716c8e2bd346c7b67d3df3915566a7c05607",
|
||||
"tarball": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz"
|
||||
},
|
||||
"homepage": "https://github.com/dominictarr/indexes-of",
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "dominictarr",
|
||||
"email": "dominic.tarr@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "indexes-of",
|
||||
"optionalDependencies": {},
|
||||
"readme": "# indexes-of\n\nlike Array/String#indexOf but return all the indexes in an array.\n\n``` js\nvar indexesOf = require('indexes-of')\n\nvar twosIndexes = indexesOf([1, 2, 3, 4, 5, 4, 3, 2, 1], 2)\n\nconsole.log(twosIndexes)\n\n// [1, 7]\n\n```\n\n# Haiku\n\n* A 5 line module.\n* But the tests are 40 lines.\n* npm publish.\n\n## License\n\nMIT\n",
|
||||
"readmeFilename": "README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/dominictarr/indexes-of.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
38
node_modules/indexes-of/test.js
generated
vendored
Normal file
38
node_modules/indexes-of/test.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
var tape = require('tape')
|
||||
|
||||
var indexes = require('./')
|
||||
|
||||
tape('indexes of - 2 matches', function (t) {
|
||||
var x = indexes([1,2,3, 2,4,5,9,8,0], 2)
|
||||
t.deepEqual(x, [1,3])
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
tape('indexes of - 1 match', function (t) {
|
||||
var x = indexes([1,2,3, 2,4,5,9,8,0], 2)
|
||||
t.deepEqual(x, [1,3])
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
tape('indexes of - empty', function (t) {
|
||||
var x = indexes([1,2,3, 2,4,5,9,8,0], 24)
|
||||
t.deepEqual(x, [])
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
tape('indexes of - empty', function (t) {
|
||||
var x = indexes([8,8,8,8,8,8,8], 8)
|
||||
t.deepEqual(x, [0,1,2,3,4,5,6])
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
tape('indexes of - string', function (t) {
|
||||
var x = indexes('foo bar baz foo', 'foo')
|
||||
t.deepEqual(x, [0, 12])
|
||||
t.end()
|
||||
})
|
Reference in New Issue
Block a user