collect-your-stuff 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -3926
- package/browser/collect-your-stuff.js +912 -549
- package/browser/collect-your-stuff.min.js +1 -1
- package/dist/collections/arrayable/ArrayElement.d.ts +6 -11
- package/dist/collections/arrayable/ArrayElement.js +5 -7
- package/dist/collections/arrayable/Arrayable.d.ts +22 -37
- package/dist/collections/arrayable/Arrayable.js +208 -223
- package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +9 -14
- package/dist/collections/doubly-linked-list/DoubleLinker.js +71 -73
- package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +19 -36
- package/dist/collections/doubly-linked-list/DoublyLinkedList.js +310 -327
- package/dist/collections/linked-list/LinkedList.d.ts +20 -36
- package/dist/collections/linked-list/LinkedList.js +283 -296
- package/dist/collections/linked-list/Linker.d.ts +8 -13
- package/dist/collections/linked-list/Linker.js +82 -84
- package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +24 -43
- package/dist/collections/linked-tree-list/LinkedTreeList.js +274 -294
- package/dist/collections/linked-tree-list/TreeLinker.d.ts +14 -20
- package/dist/collections/linked-tree-list/TreeLinker.js +91 -94
- package/dist/collections/queue/Queue.d.ts +10 -14
- package/dist/collections/queue/Queue.js +114 -121
- package/dist/collections/queue/Queueable.d.ts +13 -22
- package/dist/collections/queue/Queueable.js +142 -148
- package/dist/collections/queue/TaskQueue.d.ts +8 -17
- package/dist/collections/queue/TaskQueue.js +128 -137
- package/dist/collections/scoped-collection/ScopedCollection.d.ts +42 -0
- package/dist/collections/scoped-collection/ScopedCollection.js +81 -0
- package/dist/collections/scoped-collection/ScopedCollection.min.js +1 -0
- package/dist/collections/stack/Stack.d.ts +11 -15
- package/dist/collections/stack/Stack.js +122 -129
- package/dist/collections/stack/Stackable.d.ts +9 -16
- package/dist/collections/stack/Stackable.js +81 -85
- package/dist/collections/stack/TaskStack.d.ts +8 -17
- package/dist/collections/stack/TaskStack.js +98 -107
- package/dist/main.d.ts +67 -68
- package/dist/main.js +8 -4
- package/dist/main.min.js +1 -1
- package/dist/recipes/ArrayIterator.d.ts +4 -4
- package/dist/recipes/ArrayIterator.js +4 -4
- package/dist/recipes/DoubleLinkerIterator.d.ts +3 -3
- package/dist/recipes/DoubleLinkerIterator.js +3 -3
- package/dist/recipes/IsArrayable.d.ts +13 -33
- package/dist/recipes/IsQueue.d.ts +4 -9
- package/dist/recipes/IsScopedCollection.d.ts +27 -0
- package/dist/recipes/IsScopedCollection.js +5 -0
- package/dist/recipes/IsScopedCollection.min.js +1 -0
- package/dist/recipes/IsStack.d.ts +4 -9
- package/dist/recipes/IsTreeNode.d.ts +1 -1
- package/dist/recipes/LinkerIterator.d.ts +3 -3
- package/dist/recipes/LinkerIterator.js +3 -3
- package/dist/recipes/Runnable.d.ts +3 -16
- package/dist/recipes/Runnable.js +3 -9
- package/dist/recipes/TreeLinkerIterator.d.ts +4 -4
- package/dist/recipes/TreeLinkerIterator.js +36 -36
- package/dist/recipes/recipes.d.ts +1 -4
- package/dist/recipes/recipes.js +19 -22
- package/dist/services/parseTree.d.ts +2 -3
- package/dist/services/parseTree.js +23 -24
- package/dist/services/parseTreeNext.d.ts +2 -3
- package/dist/services/parseTreeNext.js +2 -3
- package/dist/services/services.d.ts +1 -4
- package/dist/services/services.js +19 -22
- package/package.json +4 -4
|
@@ -10,8 +10,7 @@ import { IsTreeNode } from '../recipes/IsTreeNode';
|
|
|
10
10
|
* 7. Stop at root (next is null and parent is null
|
|
11
11
|
* A boundary can be given to parse only part of a tree: going back up to the parents stops at the boundary, so the
|
|
12
12
|
* parsing stays within the nodes whose parent is the boundary (and everything below them).
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @returns {IsTreeNode|null}
|
|
13
|
+
* @param treeNode Provide a node in a tree and get the next node (left-first approach)
|
|
14
|
+
* @param boundaryParent The parent of the nodes to stay within, null for the nodes at the top of a tree. When it is not given the whole tree is parsed.
|
|
16
15
|
*/
|
|
17
16
|
export declare const parseTreeNext: (treeNode: IsTreeNode, boundaryParent?: IsTreeNode | null) => IsTreeNode | null;
|
|
@@ -15,9 +15,8 @@ exports.parseTreeNext = void 0
|
|
|
15
15
|
* 7. Stop at root (next is null and parent is null
|
|
16
16
|
* A boundary can be given to parse only part of a tree: going back up to the parents stops at the boundary, so the
|
|
17
17
|
* parsing stays within the nodes whose parent is the boundary (and everything below them).
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @returns {IsTreeNode|null}
|
|
18
|
+
* @param treeNode Provide a node in a tree and get the next node (left-first approach)
|
|
19
|
+
* @param boundaryParent The parent of the nodes to stay within, null for the nodes at the top of a tree. When it is not given the whole tree is parsed.
|
|
21
20
|
*/
|
|
22
21
|
const parseTreeNext = (treeNode, boundaryParent) => {
|
|
23
22
|
if (!treeNode) {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
4
|
-
* @version 1.1.0
|
|
5
|
-
* @memberOf module:collect-your-stuff
|
|
2
|
+
* some useful resources when working with collections.
|
|
6
3
|
*/
|
|
7
4
|
/**
|
|
8
5
|
* List helpful functions when dealing with collections.
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.services = void 0
|
|
7
|
-
const _parseTree = require('./parseTree')
|
|
8
|
-
const _parseTreeNext = require('./parseTreeNext')
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
parseTree: _parseTree.parseTree,
|
|
21
|
-
parseTreeNext: _parseTreeNext.parseTreeNext
|
|
22
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.services = void 0
|
|
7
|
+
const _parseTree = require('./parseTree')
|
|
8
|
+
const _parseTreeNext = require('./parseTreeNext')
|
|
9
|
+
/**
|
|
10
|
+
* some useful resources when working with collections.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List helpful functions when dealing with collections.
|
|
15
|
+
*/
|
|
16
|
+
const services = exports.services = {
|
|
17
|
+
parseTree: _parseTree.parseTree,
|
|
18
|
+
parseTreeNext: _parseTreeNext.parseTreeNext
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "collect-your-stuff",
|
|
3
3
|
"description": "Use a variety of collections to collect your stuff when building code.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
7
7
|
"author": "Joshua Heagle",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "gulp build",
|
|
18
18
|
"dev": "gulp",
|
|
19
|
-
"
|
|
20
|
-
"readme": "gulp readme",
|
|
19
|
+
"docs": "gulp docs",
|
|
21
20
|
"test": "gulp testFull",
|
|
22
21
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
23
22
|
"test:quick": "gulp testQuick",
|
|
@@ -25,7 +24,8 @@
|
|
|
25
24
|
"watch:test": "gulp watchTest"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
28
|
-
"js-build-tools": "^5.2
|
|
27
|
+
"js-build-tools": "^5.3.2",
|
|
28
|
+
"typedoc": "^0.28.20"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|