aboutsummaryrefslogtreecommitdiff
path: root/node_modules/remove-array-items
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:43:05 +0800
committerruki <waruqi@gmail.com>2018-11-07 22:18:30 +0800
commit89e95b3f143682ed9a006991bacf45c9dcba4818 (patch)
tree4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/remove-array-items
parentaa7f0199255277949790b41c56e8ec97dd4f0da4 (diff)
downloadxmake-docs-89e95b3f143682ed9a006991bacf45c9dcba4818.tar.gz
xmake-docs-89e95b3f143682ed9a006991bacf45c9dcba4818.zip
remove node_modulesvuepress
Diffstat (limited to 'node_modules/remove-array-items')
-rwxr-xr-xnode_modules/remove-array-items/.npmignore4
-rw-r--r--node_modules/remove-array-items/.travis.yml39
-rw-r--r--node_modules/remove-array-items/LICENSE21
-rw-r--r--node_modules/remove-array-items/README.md36
-rw-r--r--node_modules/remove-array-items/index.js28
-rw-r--r--node_modules/remove-array-items/package.json29
-rw-r--r--node_modules/remove-array-items/test/index.js33
7 files changed, 0 insertions, 190 deletions
diff --git a/node_modules/remove-array-items/.npmignore b/node_modules/remove-array-items/.npmignore
deleted file mode 100755
index 62225b48..00000000
--- a/node_modules/remove-array-items/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.DS_Store
-*.log
-node_modules
-.env*
diff --git a/node_modules/remove-array-items/.travis.yml b/node_modules/remove-array-items/.travis.yml
deleted file mode 100644
index ccc0d6ad..00000000
--- a/node_modules/remove-array-items/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
-- '0.10'
-- '0.12'
-- '1'
-- '2'
-- '3'
-- '4'
-- '5'
-- '6'
-- '7'
-
-matrix:
- include:
- - node_js: '0.10'
- env: BROWSER_NAME=chrome BROWSER_VERSION=latest
- - node_js: '0.10'
- env: BROWSER_NAME=chrome BROWSER_VERSION=29
- - node_js: '0.10'
- env: BROWSER_NAME=firefox BROWSER_VERSION=latest
- - node_js: '0.10'
- env: BROWSER_NAME=opera BROWSER_VERSION=latest
- - node_js: '0.10'
- env: BROWSER_NAME=safari BROWSER_VERSION=latest
- - node_js: '0.10'
- env: BROWSER_NAME=safari BROWSER_VERSION=7
- - node_js: '0.10'
- env: BROWSER_NAME=safari BROWSER_VERSION=6
- - node_js: '0.10'
- env: BROWSER_NAME=safari BROWSER_VERSION=5
- - node_js: '0.10'
- env: BROWSER_NAME=ie BROWSER_VERSION=11
- - node_js: '0.10'
- env: BROWSER_NAME=ie BROWSER_VERSION=10
- - node_js: '0.10'
- env: BROWSER_NAME=ie BROWSER_VERSION=9 \ No newline at end of file
diff --git a/node_modules/remove-array-items/LICENSE b/node_modules/remove-array-items/LICENSE
deleted file mode 100644
index d1c9e2fb..00000000
--- a/node_modules/remove-array-items/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 Mike Reinstein
-
-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.
diff --git a/node_modules/remove-array-items/README.md b/node_modules/remove-array-items/README.md
deleted file mode 100644
index 99aeda3e..00000000
--- a/node_modules/remove-array-items/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# remove-array-items
-
-remove items from a javascript array without generating memory garbage.
-
-[![Build Status](https://travis-ci.org/mreinstein/remove-array-items.svg?branch=master)](https://travis-ci.org/mreinstein/remove-array-items)
-
-Despite there being a number of "remove array items" in npm, I couldn't find satisfying all criteria:
-
-* **doesn't generate garbage**
-* **performs similar or better to the native `array.splice`**
-* has tests
-* es3+ compatible
-
-so here we are.
-
-originally inspired by https://gamealchemist.wordpress.com/2013/05/01/lets-get-those-javascript-arrays-to-work-fast/
-
-(which is a gold mine for performant, non-garbage generating array operations by the way.)
-
-
-## api
-
-```javascript
-removeItems(arr, startIdx, removeCount)
-```
-
-
-## usage
-
-```javascript
-const removeItems = require('remove-array-items')
-
-const arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
-
-removeItems(arr, 3, 4) // after running, arr === [ 1, 2, 3, 8, 9 ]
-```
diff --git a/node_modules/remove-array-items/index.js b/node_modules/remove-array-items/index.js
deleted file mode 100644
index 468daddc..00000000
--- a/node_modules/remove-array-items/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict'
-
-/**
- * Remove a range of items from an array
- *
- * @function removeItems
- * @param {Array<*>} arr The target array
- * @param {number} startIdx The index to begin removing from (inclusive)
- * @param {number} removeCount How many items to remove
- */
-module.exports = function removeItems(arr, startIdx, removeCount)
-{
- var i, length = arr.length
-
- if (startIdx >= length || removeCount === 0) {
- return
- }
-
- removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount)
-
- var len = length - removeCount
-
- for (i = startIdx; i < len; ++i) {
- arr[i] = arr[i + removeCount]
- }
-
- arr.length = len
-}
diff --git a/node_modules/remove-array-items/package.json b/node_modules/remove-array-items/package.json
deleted file mode 100644
index cd2af476..00000000
--- a/node_modules/remove-array-items/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "remove-array-items",
- "version": "1.0.0",
- "description": "remove items from a javascript array without generating memory garbage",
- "main": "index.js",
- "scripts": {
- "test": "tap ./test"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mreinstein/remove-array-items.git"
- },
- "keywords": [
- "array",
- "splice",
- "remove",
- "nogarbage",
- "gcfriendly"
- ],
- "author": "Mike Reinstein",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/mreinstein/remove-array-items/issues"
- },
- "homepage": "https://github.com/mreinstein/remove-array-items#readme",
- "devDependencies": {
- "tap": "^10.3.2"
- }
-}
diff --git a/node_modules/remove-array-items/test/index.js b/node_modules/remove-array-items/test/index.js
deleted file mode 100644
index 8729ec36..00000000
--- a/node_modules/remove-array-items/test/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict'
-
-var removeItems = require('../index')
-var test = require('tap').test
-
-
-test('should return if the start index is greater than or equal to the length of the array', function(t) {
- var arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
- removeItems(arr, arr.length + 1, 5)
- t.equals(arr.length, 10)
- t.end()
-})
-
-test('should return if the remove count is 0', function(t) {
- var arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
- removeItems(arr, 2, 0)
- t.equals(arr.length, 10)
- t.end()
-})
-
-test('should remove the number of elements specified from the array, starting from the start index', function(t) {
- var arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
- removeItems(arr, 3, 4)
- t.deepEquals(arr, [ 1, 2, 3, 8, 9, 10 ])
- t.end()
-})
-
-test('should remove other elements if delete count is > than the number of elements after start index', function(t) {
- var arr = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
- removeItems(arr, 7, 10)
- t.deepEquals(arr, [ 1, 2, 3, 4, 5, 6, 7 ])
- t.end()
-})