├── .travis.yml ├── src ├── dataStructures │ ├── heap.js │ ├── node.js │ ├── stack.js │ ├── queue.js │ ├── doubleNode.js │ ├── binarySearchTree.js │ ├── singlyLinkedList.js │ ├── treeNode.js │ ├── hashTable.js │ └── doublyLinkedList.js ├── index.js ├── algorithms │ ├── permutations.js │ ├── factorial.js │ ├── combinations.js │ ├── fibonacci.js │ ├── insertionSort.js │ ├── bubbleSort.js │ ├── selectionSort.js │ ├── mergeSort.js │ └── quickSort.js ├── algorithms.js └── dataStructures.js ├── .eslintrc.json ├── test ├── permutationsTest.js ├── combinationsTest.js ├── factorialTest.js ├── fibonacciTest.js ├── binarySearchTreeTest.js ├── mergeSortTest.js ├── bubbleSortTest.js ├── insertionSortTest.js ├── quickSortTest.js ├── selectionSortTest.js ├── hashTableTest.js ├── stackTest.js ├── queueTest.js ├── singlyLinkedListTest.js ├── test.js └── doublyLinkedListTest.js ├── package.json ├── LICENSE ├── .gitignore ├── README.md ├── CONTRIBUTING.md └── yarn.lock /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "9" 4 | -------------------------------------------------------------------------------- /src/dataStructures/heap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation of a heap in Javascript. 3 | */ -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | const algorithms = require('./algorithms'); 2 | const dataStructures = require('./dataStructures'); 3 | 4 | module.exports = { 5 | algorithms, 6 | dataStructures, 7 | }; 8 | -------------------------------------------------------------------------------- /src/algorithms/permutations.js: -------------------------------------------------------------------------------- 1 | const factorial = require('./factorial'); 2 | 3 | module.exports = (n, r) => { 4 | if (!(n >= r) && (r > 0)) { 5 | return -1; 6 | } 7 | return (factorial(n) / factorial(n - r)); 8 | }; 9 | -------------------------------------------------------------------------------- /src/algorithms/factorial.js: -------------------------------------------------------------------------------- 1 | const factorial = (n) => { 2 | if (n >= 1) { 3 | return n * factorial(n - 1); 4 | } if (n < 0) { 5 | return -1; 6 | } 7 | return 1; 8 | }; 9 | 10 | module.exports = factorial; 11 | -------------------------------------------------------------------------------- /src/algorithms/combinations.js: -------------------------------------------------------------------------------- 1 | const factorial = require('./factorial'); 2 | 3 | module.exports = (n, r) => { 4 | if (!(n >= r) && (r > 0)) { 5 | return -1; 6 | } 7 | return (factorial(n) / (factorial(r) * factorial(n - r))); 8 | }; 9 | -------------------------------------------------------------------------------- /src/algorithms/fibonacci.js: -------------------------------------------------------------------------------- 1 | const fibonacci = (n) => { 2 | if (n <= 0) return -1; 3 | 4 | let b = 1; 5 | let c = 0; 6 | for (let i = 0; i < n; i += 1) { 7 | const a = b; 8 | b = c; 9 | c = a + b; 10 | } 11 | return c; 12 | }; 13 | 14 | module.exports = fibonacci; 15 | -------------------------------------------------------------------------------- /src/algorithms/insertionSort.js: -------------------------------------------------------------------------------- 1 | module.exports = (array) => { 2 | let i; 3 | let j; 4 | let current; 5 | 6 | for (i = 0; i < array.length; i += 1) { 7 | current = array[i]; 8 | 9 | for (j = i - 1; array[j] > current && j >= 0; j -= 1) { 10 | array[j + 1] = array[j]; 11 | } 12 | 13 | array[j + 1] = current; 14 | } 15 | 16 | return array; 17 | }; 18 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 2018 4 | }, 5 | "extends": "airbnb", 6 | "rules": { 7 | "no-console":0, 8 | "no-param-reassign": 0, 9 | "jsx-a11y/href-no-hash": "off", 10 | "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }] 11 | }, 12 | "env": { 13 | "node": true, 14 | "es6": true, 15 | "mocha": true 16 | } 17 | } -------------------------------------------------------------------------------- /src/algorithms/bubbleSort.js: -------------------------------------------------------------------------------- 1 | // Bubble Sort Implementation of O(n^2) 2 | 3 | module.exports = (array) => { 4 | const sortedArray = array; 5 | for (let i = 0; i < sortedArray.length; i += 1) { 6 | for (let j = 1; j < sortedArray.length; j += 1) { 7 | if (sortedArray[j - 1] > sortedArray[j]) { 8 | [sortedArray[j - 1], sortedArray[j]] = [sortedArray[j], sortedArray[j - 1]]; 9 | } 10 | } 11 | } 12 | 13 | return sortedArray; 14 | }; 15 | -------------------------------------------------------------------------------- /src/algorithms/selectionSort.js: -------------------------------------------------------------------------------- 1 | module.exports = (array) => { 2 | let min; 3 | 4 | for (let i = 0; i < array.length; i += 1) { 5 | min = i; 6 | 7 | for (let j = i + 1; j < array.length; j += 1) { 8 | if (array[j] < array[min]) { 9 | min = j; 10 | } 11 | } 12 | 13 | if (min !== i) { 14 | const temp = array[i]; 15 | array[i] = array[min]; 16 | array[min] = temp; 17 | } 18 | } 19 | 20 | return array; 21 | }; 22 | -------------------------------------------------------------------------------- /src/algorithms.js: -------------------------------------------------------------------------------- 1 | const bubbleSort = require('./algorithms/bubbleSort'); 2 | const insertionSort = require('./algorithms/insertionSort'); 3 | const selectionSort = require('./algorithms/selectionSort'); 4 | const mergeSort = require('./algorithms/mergeSort'); 5 | const quickSort = require('./algorithms/quickSort'); 6 | const factorial = require('./algorithms/factorial'); 7 | 8 | module.exports = { 9 | bubbleSort, 10 | insertionSort, 11 | selectionSort, 12 | mergeSort, 13 | quickSort, 14 | factorial, 15 | }; 16 | -------------------------------------------------------------------------------- /test/permutationsTest.js: -------------------------------------------------------------------------------- 1 | const permutations = require('../src/algorithms/permutations'); 2 | 3 | module.exports = () => { 4 | const inputs = [[10, 4], [2, 1], [0, 0], [1, 1], [2, 4]]; 5 | const answers = [5040, 2, 1, 1, -1]; 6 | const attempt = []; 7 | let flag = false; 8 | 9 | for (let i = 0; i < inputs.length; i += 1) { 10 | attempt.push(permutations(inputs[i][0], inputs[i][1])); 11 | if (attempt[i] !== answers[i]) { 12 | flag = true; 13 | } 14 | } 15 | console.log(`Input array: ${inputs.join(' ')}`); 16 | console.log(`Answer array: ${answers.join(' ')}`); 17 | console.log(`Attempted array: ${attempt.join(' ')}`); 18 | 19 | return !flag; 20 | }; 21 | -------------------------------------------------------------------------------- /test/combinationsTest.js: -------------------------------------------------------------------------------- 1 | const combinations = require('../src/algorithms/combinations'); 2 | 3 | module.exports = () => { 4 | const inputs = [[10, 4], [2, 1], [0, 0], [1, 1], [2, 4]]; 5 | const answers = [210, 2, 1, 1, -1]; 6 | const attempt = []; 7 | let flag = false; 8 | 9 | for (let i = 0; i < inputs.length; i += 1) { 10 | attempt.push(combinations(inputs[i][0], inputs[i][1])); 11 | if (attempt[i] !== answers[i]) { 12 | flag = true; 13 | } 14 | } 15 | 16 | console.log(`Input array: ${inputs.join(' ')}`); 17 | console.log(`Answer array: ${answers.join(' ')}`); 18 | console.log(`Attempted array: ${attempt.join(' ')}`); 19 | 20 | return !flag; 21 | }; 22 | -------------------------------------------------------------------------------- /test/factorialTest.js: -------------------------------------------------------------------------------- 1 | const factorial = require('../src/algorithms/factorial'); 2 | 3 | module.exports = () => { 4 | const numbers = [-1, 0, 1, 2, 5, 10]; 5 | const answers = [-1, 1, 1, 2, 120, 3628800]; 6 | const attempt = []; 7 | let flag = false; 8 | 9 | for (let i = 0; i < numbers.length; i += 1) { 10 | attempt.push(factorial(numbers[i])); 11 | if (attempt[i] !== answers[i]) { 12 | flag = true; 13 | } 14 | } 15 | 16 | console.log(`Input array: ${numbers.join(' ')}`); 17 | console.log(`Answer array: ${answers.join(' ')}`); 18 | console.log(`Attempted array: ${attempt.join(' ')}`); 19 | 20 | if (flag) { 21 | return false; 22 | } 23 | return true; 24 | }; 25 | -------------------------------------------------------------------------------- /test/fibonacciTest.js: -------------------------------------------------------------------------------- 1 | const fibonacci = require('../src/algorithms/fibonacci'); 2 | 3 | module.exports = () => { 4 | const numbers = [-1, 0, 1, 2, 3, 5, 10]; 5 | const answers = [-1, -1, 1, 1, 2, 5, 55]; 6 | const attempt = []; 7 | let flag = false; 8 | 9 | for (let i = 0; i < numbers.length; i += 1) { 10 | attempt.push(fibonacci(numbers[i])); 11 | if (attempt[i] !== answers[i]) { 12 | flag = true; 13 | } 14 | } 15 | 16 | console.log(`Input array: ${numbers.join(' ')}`); 17 | console.log(`Answer array: ${answers.join(' ')}`); 18 | console.log(`Attempted array: ${attempt.join(' ')}`); 19 | 20 | if (flag) { 21 | return false; 22 | } 23 | return true; 24 | }; 25 | -------------------------------------------------------------------------------- /src/algorithms/mergeSort.js: -------------------------------------------------------------------------------- 1 | // Helper function for merge sort 2 | function merge(left, right) { 3 | const array = []; 4 | 5 | while (left.length && right.length) { 6 | if (left[0] < right[0]) { 7 | array.push(left.shift()); 8 | } else { 9 | array.push(right.shift()); 10 | } 11 | } 12 | return array.concat(left.slice()).concat(right.slice()); 13 | } 14 | 15 | function mergeSort(array) { 16 | if (array.length < 2) { 17 | return array; 18 | } 19 | 20 | const middle = Math.floor(array.length / 2); 21 | const left = array.slice(0, middle); 22 | const right = array.slice(middle); 23 | 24 | return merge(mergeSort(left), mergeSort(right)); 25 | } 26 | 27 | module.exports = mergeSort; 28 | -------------------------------------------------------------------------------- /src/dataStructures/node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation of a Node in Javascript. 3 | */ 4 | module.exports = class Node { 5 | constructor(value) { 6 | this.value = value; 7 | this.next = null; 8 | } 9 | 10 | getValue() { 11 | return this.value; 12 | } 13 | 14 | hasNext() { 15 | return (this.next !== null); 16 | } 17 | 18 | getNext() { 19 | let n = null; 20 | if (this.hasNext()) { 21 | n = this.next; 22 | } 23 | return n; 24 | } 25 | 26 | setValue(newValue) { 27 | const oldValue = this.value; 28 | this.value = newValue; 29 | return oldValue; 30 | } 31 | 32 | setNext(newNext) { 33 | const oldNext = this.next; 34 | this.next = newNext; 35 | return oldNext; 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /src/dataStructures.js: -------------------------------------------------------------------------------- 1 | const node = require('./dataStructures/node'); 2 | const doubleNode = require('./dataStructures/doubleNode'); 3 | const singlyLinkedList = require('./dataStructures/singlyLinkedList'); 4 | const doublyLinkedList = require('./dataStructures/doublyLinkedList'); 5 | const stack = require('./dataStructures/stack'); 6 | const queue = require('./dataStructures/queue'); 7 | const treeNode = require('./dataStructures/treeNode'); 8 | const binarySearchTree = require('./dataStructures/binarySearchTree'); 9 | const hashTable = require('./dataStructures/hashTable'); 10 | 11 | module.exports = { 12 | node, 13 | doubleNode, 14 | singlyLinkedList, 15 | doublyLinkedList, 16 | stack, 17 | queue, 18 | treeNode, 19 | binarySearchTree, 20 | hashTable, 21 | }; 22 | -------------------------------------------------------------------------------- /test/binarySearchTreeTest.js: -------------------------------------------------------------------------------- 1 | const BinarySearchTree = require('../src/dataStructures/binarySearchTree'); 2 | 3 | module.exports = () => { 4 | const array = []; 5 | const randomSize = Math.floor((Math.random() * 20) + 1); 6 | // Generate an array containing a random number of random numbers from 1 to 20 7 | for (let i = 0; i < randomSize; i += 1) { 8 | array.push(Math.floor((Math.random() * 20) + 1)); 9 | } 10 | console.log(`Initial Array: ${array.join(' ')}`); 11 | const bst = new BinarySearchTree(array); 12 | const inorderArray = bst.inorderTraversal(); 13 | console.log(`Sorted Array: ${inorderArray.join(' ')}`); 14 | 15 | // Make sure each value is incremental, and fail test if not 16 | for (let i = 0; i < randomSize - 1; i += 1) { 17 | if (inorderArray[i] > inorderArray[i + 1]) { 18 | return false; 19 | } 20 | } 21 | return true; 22 | }; 23 | -------------------------------------------------------------------------------- /src/dataStructures/stack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation of a Stack in Javascript. 3 | */ 4 | module.exports = class Stack { 5 | constructor() { 6 | this.elements = []; 7 | } 8 | 9 | push(element) { 10 | this.elements.push(element); 11 | } 12 | 13 | pop() { 14 | if (!this.isEmpty()) { 15 | return this.elements.pop(); 16 | } 17 | return null; 18 | } 19 | 20 | peek() { 21 | if (!this.isEmpty()) { 22 | return this.elements[this.elements.length - 1]; 23 | } 24 | return null; 25 | } 26 | 27 | size() { 28 | return this.elements.length; 29 | } 30 | 31 | isEmpty() { 32 | return (this.elements.length === 0); 33 | } 34 | 35 | clear() { 36 | this.elements = []; 37 | } 38 | 39 | toString() { 40 | return this.elements.join(' '); 41 | } 42 | 43 | print() { 44 | console.log(this.toString()); 45 | } 46 | }; 47 | -------------------------------------------------------------------------------- /src/dataStructures/queue.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation of a Queue in Javascript. 3 | */ 4 | module.exports = class Queue { 5 | constructor() { 6 | this.elements = []; 7 | } 8 | 9 | enqueue(element) { 10 | this.elements.push(element); 11 | } 12 | 13 | dequeue() { 14 | if (this.elements.length !== 0) { 15 | return this.elements.shift(); 16 | } 17 | return null; 18 | } 19 | 20 | peek() { 21 | if (this.elements.length !== 0) { 22 | return this.elements[0]; 23 | } 24 | return null; 25 | } 26 | 27 | size() { 28 | return this.elements.length; 29 | } 30 | 31 | isEmpty() { 32 | return (this.elements.length === 0); 33 | } 34 | 35 | clear() { 36 | this.elements = []; 37 | } 38 | 39 | toString() { 40 | return this.elements.join(' '); 41 | } 42 | 43 | print() { 44 | console.log(this.toString()); 45 | } 46 | }; 47 | -------------------------------------------------------------------------------- /src/algorithms/quickSort.js: -------------------------------------------------------------------------------- 1 | function swap(array, i, j) { 2 | const temp = array[i]; 3 | array[i] = array[j]; 4 | array[j] = temp; 5 | } 6 | 7 | function partition(array, pivot, left, right) { 8 | const pivotValue = array[pivot]; 9 | let partitionIndex = left; 10 | 11 | for (let i = left; i < right; i += 1) { 12 | if (array[i] < pivotValue) { 13 | swap(array, i, partitionIndex); 14 | partitionIndex += 1; 15 | } 16 | } 17 | swap(array, right, partitionIndex); 18 | return partitionIndex; 19 | } 20 | 21 | function quickSort(array, left, right) { 22 | let pivot; let 23 | partitionIndex; 24 | 25 | if (left < right) { 26 | pivot = right; 27 | partitionIndex = partition(array, pivot, left, right); 28 | 29 | quickSort(array, left, partitionIndex - 1); 30 | quickSort(array, partitionIndex + 1, right); 31 | } 32 | return array; 33 | } 34 | 35 | module.exports = quickSort; 36 | -------------------------------------------------------------------------------- /test/mergeSortTest.js: -------------------------------------------------------------------------------- 1 | const mergeSort = require('../src/algorithms/mergeSort'); 2 | 3 | // Test Merge Sort 4 | module.exports = () => { 5 | const array = []; 6 | const randomSize = Math.floor((Math.random() * 20) + 1); 7 | // Generate an array containing a random number of random numbers from 1 to 20 8 | for (let i = 0; i < randomSize; i += 1) { 9 | array.push(Math.floor((Math.random() * 20) + 1)); 10 | } 11 | console.log(`Initial Array: ${array.join(' ')}`); 12 | 13 | // Sort it 14 | const sortedArray = mergeSort(array); 15 | console.log(`Sorted Array: ${sortedArray.join(' ')}`); 16 | 17 | // Check size of sorted array is same as original 18 | if (sortedArray.length !== array.length) return false; 19 | 20 | // Make sure each value is incremental, and fail test if not 21 | for (let i = 0; i < randomSize - 1; i += 1) { 22 | if (sortedArray[i] > sortedArray[i + 1]) { 23 | return false; 24 | } 25 | } 26 | 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /test/bubbleSortTest.js: -------------------------------------------------------------------------------- 1 | const bubbleSort = require('../src/algorithms/bubbleSort'); 2 | 3 | // Test Bubble Sort 4 | module.exports = () => { 5 | const array = []; 6 | const randomSize = Math.floor((Math.random() * 20) + 1); 7 | // Generate an array containing a random number of random numbers from 1 to 20 8 | for (let i = 0; i < randomSize; i += 1) { 9 | array.push(Math.floor((Math.random() * 20) + 1)); 10 | } 11 | console.log(`Initial Array: ${array.join(' ')}`); 12 | 13 | // Sort it 14 | const sortedArray = bubbleSort(array); 15 | console.log(`Sorted Array: ${sortedArray.join(' ')}`); 16 | 17 | // Check size of sorted array is same as original 18 | if (sortedArray.length !== array.length) return false; 19 | 20 | // Make sure each value is incremental, and fail test if not 21 | for (let i = 0; i < randomSize - 1; i += 1) { 22 | if (sortedArray[i] > sortedArray[i + 1]) { 23 | return false; 24 | } 25 | } 26 | 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /test/insertionSortTest.js: -------------------------------------------------------------------------------- 1 | const insertionSort = require('../src/algorithms/insertionSort'); 2 | 3 | // Test Insertion Sort 4 | module.exports = () => { 5 | const array = []; 6 | const randomSize = Math.floor((Math.random() * 20) + 1); 7 | // Generate an array containing a random number of random numbers from 1 to 20 8 | for (let i = 0; i < randomSize; i += 1) { 9 | array.push(Math.floor((Math.random() * 20) + 1)); 10 | } 11 | console.log(`Initial Array: ${array.join(' ')}`); 12 | 13 | // Sort it 14 | const sortedArray = insertionSort(array); 15 | console.log(`Sorted Array: ${sortedArray.join(' ')}`); 16 | 17 | // Check size of sorted array is same as original 18 | if (sortedArray.length !== array.length) return false; 19 | 20 | // Make sure each value is incremental, and fail test if not 21 | for (let i = 0; i < randomSize - 1; i += 1) { 22 | if (sortedArray[i] > sortedArray[i + 1]) { 23 | return false; 24 | } 25 | } 26 | 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /test/quickSortTest.js: -------------------------------------------------------------------------------- 1 | const quickSort = require('../src/algorithms/quickSort'); 2 | 3 | // Test Quick Sort 4 | module.exports = () => { 5 | const array = []; 6 | const randomSize = Math.floor((Math.random() * 20) + 1); 7 | // Generate an array containing a random number of random numbers from 1 to 20 8 | for (let i = 0; i < randomSize; i += 1) { 9 | array.push(Math.floor((Math.random() * 20) + 1)); 10 | } 11 | console.log(`Initial Array: ${array.join(' ')}`); 12 | 13 | // Sort it 14 | const sortedArray = quickSort(array, 0, array.length); 15 | console.log(`Sorted Array: ${sortedArray.join(' ')}`); 16 | 17 | // Check size of sorted array is same as original 18 | if (sortedArray.length !== array.length) return false; 19 | 20 | // Make sure each value is incremental, and fail test if not 21 | for (let i = 0; i < randomSize - 1; i += 1) { 22 | if (sortedArray[i] > sortedArray[i + 1]) { 23 | return false; 24 | } 25 | } 26 | 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /test/selectionSortTest.js: -------------------------------------------------------------------------------- 1 | const selectionSort = require('../src/algorithms/selectionSort'); 2 | 3 | // Test Selection Sort 4 | module.exports = () => { 5 | const array = []; 6 | const randomSize = Math.floor((Math.random() * 20) + 1); 7 | // Generate an array containing a random number of random numbers from 1 to 20 8 | for (let i = 0; i < randomSize; i += 1) { 9 | array.push(Math.floor((Math.random() * 20) + 1)); 10 | } 11 | console.log(`Initial Array: ${array.join(' ')}`); 12 | 13 | // Sort it 14 | const sortedArray = selectionSort(array); 15 | console.log(`Sorted Array: ${sortedArray.join(' ')}`); 16 | 17 | // Check size of sorted array is same as original 18 | if (sortedArray.length !== array.length) return false; 19 | 20 | // Make sure each value is incremental, and fail test if not 21 | for (let i = 0; i < randomSize - 1; i += 1) { 22 | if (sortedArray[i] > sortedArray[i + 1]) { 23 | return false; 24 | } 25 | } 26 | 27 | return true; 28 | }; 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "programjs", 3 | "version": "0.1.2", 4 | "description": "A comprehensive and lightweight npm package of common data structures and algorithms to accelerate development.", 5 | "main": "./index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/eloreprojects/programjs.git" 9 | }, 10 | "scripts": { 11 | "lint": "eslint src/** --fix && eslint test/** --fix", 12 | "test": "npm run lint && mocha --reporter spec" 13 | }, 14 | "author": "Arun Kirubarajan & Neeraj Aggarwal", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/eloreprojects/programjs/issues" 18 | }, 19 | "homepage": "https://github.com/eloreprojects/programjs#readme", 20 | "devDependencies": { 21 | "chai": "^4.2.0", 22 | "eslint": "^5.8.0", 23 | "eslint-config-airbnb": "^17.1.0", 24 | "eslint-plugin-import": "^2.14.0", 25 | "mocha": "^5.2.0" 26 | }, 27 | "dependencies": { 28 | "eslint-config-airbnb": "^17.1.0", 29 | "eslint-plugin-jsx-a11y": "^6.1.2", 30 | "eslint-plugin-react": "^7.11.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 elore 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | .DS_Store 61 | .vscode 62 | -------------------------------------------------------------------------------- /src/dataStructures/doubleNode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * An implementation of a DoubleNode in Javascript. 3 | */ 4 | module.exports = class DoubleNode { 5 | constructor(value) { 6 | this.value = value; 7 | this.next = null; 8 | this.previous = null; 9 | } 10 | 11 | getValue() { 12 | return this.value; 13 | } 14 | 15 | setValue(newValue) { 16 | const oldValue = this.value; 17 | this.value = newValue; 18 | return oldValue; 19 | } 20 | 21 | hasNext() { 22 | return (this.next !== null); 23 | } 24 | 25 | hasPrevious() { 26 | return (this.previous !== null); 27 | } 28 | 29 | getNext() { 30 | let n = null; 31 | if (this.hasNext()) { 32 | n = this.next; 33 | } 34 | return n; 35 | } 36 | 37 | getPrevious() { 38 | let n = null; 39 | if (this.hasPrevious()) { 40 | n = this.previous; 41 | } 42 | return n; 43 | } 44 | 45 | setNext(newNext) { 46 | const oldNext = this.next; 47 | this.next = newNext; 48 | return oldNext; 49 | } 50 | 51 | setPrevious(newPrevious) { 52 | const oldPrevious = this.previous; 53 | this.previous = newPrevious; 54 | return oldPrevious; 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /src/dataStructures/binarySearchTree.js: -------------------------------------------------------------------------------- 1 | const TreeNode = require('./treeNode.js'); 2 | 3 | // Private method 4 | const addNodeHelper = (value, head) => { 5 | if (head === null) { 6 | const newNode = new TreeNode(value); 7 | return newNode; 8 | } if (value <= head.value) { 9 | head.left = addNodeHelper(value, head.left); 10 | } else { 11 | head.right = addNodeHelper(value, head.right); 12 | } 13 | return head; 14 | }; 15 | 16 | module.exports = class BinarySearchTree { 17 | constructor(args) { 18 | this.head = null; 19 | if (args !== undefined) { 20 | if (Array.isArray(args)) { 21 | this.addNodesFromArray(args); 22 | } else { 23 | this.addNode(args); 24 | } 25 | } 26 | } 27 | 28 | addNode(value) { 29 | this.head = addNodeHelper(value, this.head); 30 | } 31 | 32 | addNodesFromArray(args) { 33 | if (Array.isArray(args)) { 34 | for (let i = 0; i < args.length; i += 1) { 35 | this.addNode(args[i]); 36 | } 37 | } else { 38 | console.log('Please pass an array as in input param'); 39 | } 40 | } 41 | 42 | inorderTraversal() { 43 | return TreeNode.inorderTraversal(this.head); 44 | } 45 | 46 | preorderTraversal() { 47 | return TreeNode.preorderTraversal(this.head); 48 | } 49 | 50 | postorderTraversal() { 51 | return TreeNode.postorderTraversal(this.head); 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /src/dataStructures/singlyLinkedList.js: -------------------------------------------------------------------------------- 1 | const Node = require('./node'); 2 | 3 | /** 4 | * An implementation of a SinglyLinkedList in Javascript. 5 | */ 6 | module.exports = class SinglyLinkedList { 7 | constructor() { 8 | this.head = null; 9 | this.size = 0; 10 | } 11 | 12 | getNode(index) { 13 | let node = this.head; 14 | if (this.head === null || index >= this.size) { 15 | return null; 16 | } 17 | for (let i = 0; i < index; i += 1) { 18 | node = node.next; 19 | } 20 | return node; 21 | } 22 | 23 | get(index) { 24 | const node = this.getNode(index); 25 | if (node === null) { 26 | return null; 27 | } 28 | return node.value; 29 | } 30 | 31 | length() { 32 | return this.size; 33 | } 34 | 35 | add(value) { 36 | const node = new Node(value); 37 | if (this.head === null) { 38 | this.head = node; 39 | } else { 40 | let temp = this.head; 41 | while (temp.next) { 42 | temp = temp.next; 43 | } 44 | temp.next = node; 45 | } 46 | this.size += 1; 47 | } 48 | 49 | set(index, value) { 50 | const oldValue = this.get(index); 51 | this.getNode(index).value = value; 52 | return oldValue; 53 | } 54 | 55 | remove(index) { 56 | const oldValue = this.get(index); 57 | if (index === 0) { // first node 58 | this.head = this.head.next; 59 | } else if (index === this.size - 1) { // last node 60 | this.getNode(index - 1).next = null; 61 | } else { 62 | this.getNode(index - 1).next = this.getNode(index + 1); 63 | } 64 | this.size -= 1; 65 | return oldValue; 66 | } 67 | }; 68 | -------------------------------------------------------------------------------- /test/hashTableTest.js: -------------------------------------------------------------------------------- 1 | const HashTable = require('../src/dataStructures/hashTable'); 2 | 3 | class hashTableTest { 4 | static testAddandSearchandLength() { 5 | // Create HashTable with 3 buckets 6 | const hashTable = new HashTable(3); 7 | hashTable.add('first', 1); 8 | hashTable.add('second', 2); 9 | hashTable.add('third', 3); 10 | hashTable.add('fourth', 4); 11 | hashTable.add('fifth', 5); 12 | console.log(`HashTable contents: ${hashTable.toString()}`); 13 | console.log(`HashTable length: ${hashTable.length()}`); 14 | 15 | if (hashTable.length() !== 5) return false; 16 | 17 | // Search for 'second' and 'third' 18 | const searchSecond = hashTable.search('second'); 19 | const searchThird = hashTable.search('third'); 20 | 21 | console.log(`Search for 'second': ${searchSecond}`); 22 | console.log(`Search for 'third': ${searchThird}`); 23 | 24 | return (searchSecond === 2 && searchThird === 3); 25 | } 26 | 27 | static testRemove() { 28 | // Create HashTable with 3 buckets 29 | const hashTable = new HashTable(3); 30 | hashTable.add('first', 1); 31 | hashTable.add('second', 2); 32 | hashTable.add('third', 3); 33 | hashTable.add('fourth', 4); 34 | hashTable.add('fifth', 5); 35 | console.log(`HashTable contents: ${hashTable.toString()}`); 36 | console.log(`HashTable length: ${hashTable.length()}`); 37 | 38 | hashTable.remove('fourth'); 39 | 40 | console.log(`HashTable after removing 'fourth': ${hashTable.toString()}`); 41 | console.log(`HashTable length after remove: ${hashTable.length()}`); 42 | 43 | return ((hashTable.search('fourth') === null) && (hashTable.length() === 4)); 44 | } 45 | } 46 | 47 | module.exports = hashTableTest; 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # program.js 2 | 3 | [![NPM](https://nodei.co/npm/programjs.png?mini=true)](https://nodei.co/npm/programjs/) 4 | 5 | [![Travis](https://travis-ci.org/eloreprojects/programjs.svg?branch=master)](https://travis-ci.org/eloreprojects/programjs) 6 | [![gary](https://img.shields.io/badge/gary-approved-11999E.svg)](http://elore.io) 7 | 8 | A comprehensive and lightweight npm package of common data structures and algorithms to accelerate development. 9 | 10 | ## About 11 | 12 | Why is this module named program.js? An inspiration for this project was computer science pioneer Niklaus Wirth: author of the classic textbook *Algorithms + Data Structures = Programs*. We believe that the philosophy of algorithms and data structures being at the core of software is important, so this module is made in the textbook's honor. 13 | 14 | ![Textbook](https://upload.wikimedia.org/wikipedia/en/9/90/Algorithms_%2B_Data_Structures.jpg) 15 | 16 | ### Current Implementations 17 | 18 | #### Algorithms 19 | 20 | - [x] Bubble Sort 21 | - [x] Insertion Sort 22 | - [x] Selection Sort 23 | - [x] Quick Sort 24 | - [x] Merge Sort 25 | - [x] Factorial 26 | - [x] Fibonacci 27 | - [x] Combinations 28 | - [x] Permutations 29 | 30 | #### Data Structures 31 | 32 | - [x] Node 33 | - [x] DoubleNode 34 | - [x] SinglyLinkedList 35 | - [x] DoublyLinkedList 36 | - [x] Stack 37 | - [x] Queue 38 | - [ ] Heap 39 | - [x] TreeNode 40 | - [x] Binary Search Tree 41 | - [x] HashTable 42 | 43 | ## Usage 44 | 45 | 1. Install the package using `npm install --save programjs` or `yarn add programjs` 46 | 2. Import the feature set you would like to use (e.g. `import { algorithms } from 'programjs'`) 47 | 3. Access specific implementation through the feature set object (e.g. `const sorted_array = algorithms.bubble_sort(array)`) 48 | 49 | ## Contributing 50 | 51 | If you're interested in contributing to program.js, refer to [our guide](https://github.com/eloreprojects/programjs/blob/master/CONTRIBUTING.md). 52 | 53 | ## License 54 | 55 | We believe in open source projects. Our code is licensed under the MIT License.. 56 | -------------------------------------------------------------------------------- /src/dataStructures/treeNode.js: -------------------------------------------------------------------------------- 1 | /* eslint comma-dangle: ["error", "never"] */ 2 | 3 | // Private method 4 | const findHeightHelper = (head, height) => { 5 | if (head == null) { 6 | return height; 7 | } 8 | height += 1; 9 | return Math.max( 10 | this.findHeightHelper(head.left, height), 11 | this.findHeightHelper(head.right, height) 12 | ) + 1; 13 | }; 14 | 15 | const preorderTraversalHelper = (head, arr) => { 16 | if (head === null) { 17 | return; 18 | } 19 | arr.push(head.value); 20 | preorderTraversalHelper(head.left, arr); 21 | preorderTraversalHelper(head.right, arr); 22 | }; 23 | 24 | const inorderTraversalHelper = (head, arr) => { 25 | if (head === null) { 26 | return; 27 | } 28 | inorderTraversalHelper(head.left, arr); 29 | arr.push(head.value); 30 | inorderTraversalHelper(head.right, arr); 31 | }; 32 | 33 | const postorderTraversalHelper = (head, arr) => { 34 | if (head === null) { 35 | return; 36 | } 37 | postorderTraversalHelper(head.left, arr); 38 | postorderTraversalHelper(head.right, arr); 39 | arr.push(head.value); 40 | }; 41 | 42 | module.exports = class TreeNode { 43 | constructor(value) { 44 | this.value = value; 45 | this.left = null; 46 | this.right = null; 47 | } 48 | 49 | getValue() { 50 | return this.value; 51 | } 52 | 53 | getLeftNode() { 54 | return this.left; 55 | } 56 | 57 | getRigthNode() { 58 | return this.right; 59 | } 60 | 61 | setValue(value) { 62 | this.value = value; 63 | } 64 | 65 | setLeftNode(left) { 66 | this.left = left; 67 | } 68 | 69 | setRightNode(right) { 70 | this.right = right; 71 | } 72 | 73 | static preorderTraversal(head) { 74 | const arr = []; 75 | preorderTraversalHelper(head, arr); 76 | return arr; 77 | } 78 | 79 | static inorderTraversal(head) { 80 | const arr = []; 81 | inorderTraversalHelper(head, arr); 82 | return arr; 83 | } 84 | 85 | static postorderTraversal(head) { 86 | const arr = []; 87 | postorderTraversalHelper(head, arr); 88 | // console.log(arr); 89 | return arr; 90 | } 91 | 92 | static findHeight(head) { 93 | return findHeightHelper(head, 0); 94 | } 95 | }; 96 | -------------------------------------------------------------------------------- /src/dataStructures/hashTable.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-bitwise */ 2 | 3 | /** 4 | * An implementation of a Hash Table in Javascript. 5 | */ 6 | module.exports = class HashTable { 7 | constructor(size) { 8 | this.values = {}; 9 | this.numberOfValues = 0; 10 | this.size = size; 11 | } 12 | 13 | static calculateHash(key, max) { 14 | let hash = 0; 15 | const str = key.toString(); 16 | for (let i = 0; i < str.length; i += 1) { 17 | hash = (hash << 5) + hash + str.charCodeAt(i); 18 | hash &= hash; 19 | hash = Math.abs(hash); 20 | } 21 | return hash % max; 22 | } 23 | 24 | add(key, value) { 25 | const hash = HashTable.calculateHash(key, this.size); 26 | if (!Object.prototype.hasOwnProperty.call(this.values, hash)) { 27 | this.values[hash] = {}; 28 | } 29 | if (!Object.prototype.hasOwnProperty.call(this.values[hash], key)) { 30 | this.numberOfValues += 1; 31 | } 32 | this.values[hash][key] = value; 33 | } 34 | 35 | remove(key) { 36 | const hash = HashTable.calculateHash(key, this.size); 37 | if ((Object.prototype.hasOwnProperty.call(this.values, hash)) 38 | && (Object.prototype.hasOwnProperty.call(this.values[hash], key))) { 39 | delete this.values[hash][key]; 40 | this.numberOfValues -= 1; 41 | } 42 | } 43 | 44 | search(key) { 45 | const hash = HashTable.calculateHash(key, this.size); 46 | if ((Object.prototype.hasOwnProperty.call(this.values, hash)) 47 | && (Object.prototype.hasOwnProperty.call(this.values[hash], key))) { 48 | return this.values[hash][key]; 49 | } 50 | return null; 51 | } 52 | 53 | length() { 54 | return this.numberOfValues; 55 | } 56 | 57 | toString() { 58 | let string = ''; 59 | Object.keys(this.values).forEach((value) => { 60 | if (Object.prototype.hasOwnProperty.call(this.values, value)) { 61 | Object.keys(this.values[value]).forEach((key) => { 62 | if (Object.prototype.hasOwnProperty.call(this.values[value], key)) { 63 | string += `${this.values[value][key]} `; 64 | } 65 | }); 66 | } 67 | }); 68 | return string.trim(); 69 | } 70 | 71 | print() { 72 | console.log(this.toString()); 73 | } 74 | }; 75 | -------------------------------------------------------------------------------- /test/stackTest.js: -------------------------------------------------------------------------------- 1 | const Stack = require('../src/dataStructures/stack'); 2 | 3 | class stackTest { 4 | static testPush() { 5 | const array = []; 6 | const stack = new Stack(); 7 | // Add 5 randomly generated numbers 8 | let randomNumber; 9 | for (let i = 0; i < 5; i += 1) { 10 | randomNumber = Math.floor((Math.random() * 10) + 1); 11 | array.push(randomNumber); 12 | stack.push(randomNumber); 13 | } 14 | const arrayString = array.join(' '); 15 | const stackString = stack.toString(); 16 | console.log(`Array output: ${arrayString}`); 17 | console.log(`Stack output: ${stackString}`); 18 | return (stackString === arrayString); 19 | } 20 | 21 | static testPeek() { 22 | const array = []; 23 | const stack = new Stack(); 24 | // Add 2 randomly generated numbers 25 | let randomNumber; 26 | for (let i = 0; i < 2; i += 1) { 27 | randomNumber = Math.floor((Math.random() * 10) + 1); 28 | array.push(randomNumber); 29 | stack.push(randomNumber); 30 | } 31 | const arrayPeek = array[1]; 32 | const stackPeek = stack.peek(); 33 | console.log(`Array peek: ${arrayPeek}`); 34 | console.log(`Stack peek: ${stackPeek}`); 35 | return (arrayPeek === stackPeek); 36 | } 37 | 38 | static testPop() { 39 | const array = []; 40 | const stack = new Stack(); 41 | // Add 3 randomly generated numbers 42 | let randomNumber; 43 | for (let i = 0; i < 3; i += 1) { 44 | randomNumber = Math.floor((Math.random() * 10) + 1); 45 | array.push(randomNumber); 46 | stack.push(randomNumber); 47 | } 48 | const arrayFirstPop = array.pop(); 49 | const arraySecondPop = array.pop(); 50 | const stackFirstPop = stack.pop(); 51 | const stackSecondPop = stack.pop(); 52 | console.log(`Array first and second pop: ${arrayFirstPop} ${arraySecondPop}`); 53 | console.log(`Stack first and second pop: ${stackFirstPop} ${stackSecondPop}`); 54 | return ((arrayFirstPop === stackFirstPop) && (arraySecondPop === stackSecondPop)); 55 | } 56 | 57 | static testSize() { 58 | const stack = new Stack(); 59 | const randomSize = Math.floor((Math.random() * 10) + 1); 60 | // Add a random number of randomly generated numbers 61 | for (let i = 0; i < randomSize; i += 1) { 62 | stack.push(Math.floor((Math.random() * 10) + 1)); 63 | } 64 | console.log(`Stack size: ${stack.size()}`); 65 | return (randomSize === stack.size()); 66 | } 67 | 68 | static testIsEmptyAndClear() { 69 | const stack = new Stack(); 70 | // Add 4 randomly generated numbers 71 | for (let i = 0; i < 4; i += 1) { 72 | stack.push(Math.floor((Math.random() * 10) + 1)); 73 | } 74 | if (stack.isEmpty()) return false; 75 | stack.clear(); 76 | return (stack.isEmpty()); 77 | } 78 | } 79 | 80 | module.exports = stackTest; 81 | -------------------------------------------------------------------------------- /test/queueTest.js: -------------------------------------------------------------------------------- 1 | const Queue = require('../src/dataStructures/queue'); 2 | 3 | class queueTest { 4 | static testEnqueue() { 5 | const array = []; 6 | const queue = new Queue(); 7 | // Add 5 randomly generated numbers 8 | let randomNumber; 9 | for (let i = 0; i < 5; i += 1) { 10 | randomNumber = Math.floor((Math.random() * 10) + 1); 11 | array.push(randomNumber); 12 | queue.enqueue(randomNumber); 13 | } 14 | const arrayString = array.join(' '); 15 | const queueString = queue.toString(); 16 | console.log(`Array output: ${arrayString}`); 17 | console.log(`Queue output: ${queueString}`); 18 | return (queueString === arrayString); 19 | } 20 | 21 | static testDequeue() { 22 | const array = []; 23 | const queue = new Queue(); 24 | // Add 3 randomly generated numbers 25 | let randomNumber; 26 | for (let i = 0; i < 3; i += 1) { 27 | randomNumber = Math.floor((Math.random() * 10) + 1); 28 | array.push(randomNumber); 29 | queue.enqueue(randomNumber); 30 | } 31 | const arrayFirstDequeue = array.shift(); 32 | const arraySecondDequeue = array.shift(); 33 | const queueFirstDequeue = queue.dequeue(); 34 | const queueSecondDequeue = queue.dequeue(); 35 | console.log(`Array first and second dequeue: ${arrayFirstDequeue} ${arraySecondDequeue}`); 36 | console.log(`Queue first and second dequeue: ${queueFirstDequeue} ${queueSecondDequeue}`); 37 | return ((arrayFirstDequeue === queueFirstDequeue) 38 | && (arraySecondDequeue === queueSecondDequeue)); 39 | } 40 | 41 | static testPeek() { 42 | const array = []; 43 | const queue = new Queue(); 44 | // Add 2 randomly generated numbers 45 | let randomNumber; 46 | for (let i = 0; i < 2; i += 1) { 47 | randomNumber = Math.floor((Math.random() * 10) + 1); 48 | array.push(randomNumber); 49 | queue.enqueue(randomNumber); 50 | } 51 | const arrayPeek = array[0]; 52 | const queuePeek = queue.peek(); 53 | console.log(`Array peek: ${arrayPeek}`); 54 | console.log(`Queue peek: ${queuePeek}`); 55 | return (arrayPeek === queuePeek); 56 | } 57 | 58 | static testSize() { 59 | const queue = new Queue(); 60 | const randomSize = Math.floor((Math.random() * 10) + 1); 61 | // Add a random number of randomly generated numbers 62 | for (let i = 0; i < randomSize; i += 1) { 63 | queue.enqueue(Math.floor((Math.random() * 10) + 1)); 64 | } 65 | console.log(`Queue size: ${queue.size()}`); 66 | return (randomSize === queue.size()); 67 | } 68 | 69 | static testIsEmptyAndClear() { 70 | const queue = new Queue(); 71 | // Add 4 randomly generated numbers 72 | for (let i = 0; i < 4; i += 1) { 73 | queue.enqueue(Math.floor((Math.random() * 10) + 1)); 74 | } 75 | if (queue.isEmpty()) return false; 76 | queue.clear(); 77 | return (queue.isEmpty()); 78 | } 79 | } 80 | 81 | module.exports = queueTest; 82 | -------------------------------------------------------------------------------- /src/dataStructures/doublyLinkedList.js: -------------------------------------------------------------------------------- 1 | const DoubleNode = require('./doubleNode'); 2 | 3 | /** 4 | * An implementation of a DoublyLinkedList in Javascript. 5 | */ 6 | module.exports = class DoublyLinkedList { 7 | constructor() { 8 | this.head = null; 9 | this.end = null; 10 | this.size = 0; 11 | } 12 | 13 | getNodeFromFirst(index) { 14 | let current = this.head; 15 | for (let i = 0; i < index; i += 1) { 16 | current = current.next; 17 | } 18 | return current; 19 | } 20 | 21 | getNodeFromLast(index) { 22 | let current = this.end; 23 | for (let i = this.size - 1; i > index; i -= 1) { 24 | current = current.previous; 25 | } 26 | return current; 27 | } 28 | 29 | getNode(index) { 30 | if (index > this.size / 2) { 31 | return this.getNodeFromLast(index); 32 | } 33 | return this.getNodeFromFirst(index); 34 | } 35 | 36 | get(index) { 37 | return this.getNode(index).value; 38 | } 39 | 40 | getFirst() { 41 | if (this.head !== null) { 42 | return this.head.value; 43 | } 44 | return null; 45 | } 46 | 47 | getLast() { 48 | if (this.end !== null) { 49 | return this.end.value; 50 | } 51 | return null; 52 | } 53 | 54 | length() { 55 | return this.size; 56 | } 57 | 58 | set(index, newValue) { 59 | const oldValue = this.get(index); 60 | this.getNode(index).value = newValue; 61 | return oldValue; 62 | } 63 | 64 | add(value, index) { 65 | if (index === null) { 66 | const newNode = new DoubleNode(value); 67 | if (this.size === 0) { 68 | this.head = newNode; 69 | } else if (this.size === 1) { 70 | this.end = newNode; 71 | this.head.next = this.end; 72 | this.end.previous = this.head; 73 | } else { 74 | this.end.next = newNode; 75 | newNode.previous = this.end; 76 | this.end = newNode; 77 | } 78 | } else { 79 | const newNode = new DoubleNode(value); 80 | const oldNode = this.getNode(index); 81 | if (index === 0) { 82 | if (this.head !== null) { 83 | this.head.previous = newNode; 84 | } 85 | newNode.next = this.head; 86 | this.head = newNode; 87 | } else { 88 | newNode.previous = oldNode.previous; 89 | newNode.previous.next = newNode; 90 | oldNode.previous = newNode; 91 | newNode.next = oldNode; 92 | } 93 | if (this.size === 1) { 94 | this.end = this.head.next; 95 | } 96 | } 97 | this.size += 1; 98 | } 99 | 100 | addFirst(value) { 101 | const newNode = new DoubleNode(value); 102 | if (this.ize === 0) { 103 | this.head = newNode; 104 | } else if (this.size === 1) { 105 | this.end = this.head; 106 | this.head = newNode; 107 | this.head.next = this.end; 108 | this.end.previus = this.head; 109 | } else { 110 | newNode.next = this.head; 111 | this.head.previous = newNode; 112 | this.head = newNode; 113 | } 114 | this.size += 1; 115 | } 116 | 117 | addLast(value) { 118 | this.add(value); 119 | } 120 | 121 | remove(index) { 122 | const oldValue = this.get(index); 123 | const oldNode = this.getNode(index); 124 | let node; 125 | if (index === 0) { 126 | node = this.head.next; 127 | if (node !== null) { 128 | node.previous = null; 129 | this.head.next = null; 130 | } 131 | this.head = node; 132 | } else if (index === this.size - 1) { 133 | node = this.end.previous; 134 | node.next = null; 135 | this.end.previous = null; 136 | this.end = node; 137 | } else { 138 | const previousNode = oldNode.previous; 139 | const nextNode = oldNode.next; 140 | previousNode.next = nextNode; 141 | nextNode.previous = previousNode; 142 | } 143 | this.size -= 1; 144 | return oldValue; 145 | } 146 | 147 | removeFirst() { 148 | return this.remove(0); 149 | } 150 | 151 | removeLast() { 152 | return this.remove(this.size - 1); 153 | } 154 | }; 155 | -------------------------------------------------------------------------------- /test/singlyLinkedListTest.js: -------------------------------------------------------------------------------- 1 | const SinglyLinkedList = require('../src/dataStructures/singlyLinkedList'); 2 | 3 | class singlyLinkedListTest { 4 | static testAddAndGet() { 5 | const array = []; 6 | const singlyLinkedList = new SinglyLinkedList(); 7 | const randomSize = Math.floor((Math.random() * 10) + 1); 8 | // Add a random number of randomly generated numbers 9 | let addElement; 10 | for (let i = 0; i < randomSize; i += 1) { 11 | addElement = Math.floor((Math.random() * 10) + 1); 12 | singlyLinkedList.add(addElement); 13 | array.push(addElement); 14 | } 15 | // Randomly request 3 elements from the list 16 | for (let i = 0; i < 3; i += 1) { 17 | if (i < randomSize - 1) { 18 | const singlyLinkedListValue = singlyLinkedList.get(i); 19 | const arrayValue = array[i]; 20 | console.log(`SinglyLinkedList value: ${singlyLinkedListValue}`); 21 | console.log(`SinglyLinkedList value: ${arrayValue}`); 22 | if (singlyLinkedListValue !== arrayValue) return false; 23 | } 24 | } 25 | return true; 26 | } 27 | 28 | static testSet() { 29 | const array = []; 30 | const singlyLinkedList = new SinglyLinkedList(); 31 | let addElement; 32 | // Add 11 random elements into the SinglyLinkedList 33 | for (let i = 0; i < 11; i += 1) { 34 | addElement = Math.floor((Math.random() * 10) + 1); 35 | singlyLinkedList.add(addElement); 36 | array.push(addElement); 37 | } 38 | // Randomly set 3 elements 39 | for (let i = 0; i < 3; i += 1) { 40 | const randomElement = Math.floor((Math.random() * 10) + 1); 41 | const randomIndex = Math.floor((Math.random() * 10) + 1); 42 | 43 | array[randomIndex] = randomElement; 44 | singlyLinkedList.set(randomIndex, randomElement); 45 | 46 | const singlyLinkedListElement = singlyLinkedList.get(randomIndex); 47 | const arrayElement = array[randomIndex]; 48 | 49 | console.log(`SinglyLinkedList value at index ${randomIndex}: ${singlyLinkedListElement} with reassign ${randomElement}`); 50 | console.log(`Array value at index ${randomIndex}: ${arrayElement} with reassign ${randomElement}`); 51 | if (arrayElement !== singlyLinkedListElement) return false; 52 | } 53 | 54 | return true; 55 | } 56 | 57 | static testRemove() { 58 | const array = []; 59 | const singlyLinkedList = new SinglyLinkedList(); 60 | const randomSize = Math.floor((Math.random() * 10) + 3); 61 | let randomElement; 62 | // Add a random number of elements 63 | for (let i = 0; i < randomSize; i += 1) { 64 | randomElement = Math.floor((Math.random() * 10) + 1); 65 | array.push(randomElement); 66 | singlyLinkedList.add(randomElement); 67 | } 68 | 69 | let initialList = 'Initial list: '; 70 | for (let i = 0; i < randomSize; i += 1) { 71 | initialList += `${array[i].toString()} `; 72 | } 73 | console.log(initialList); 74 | 75 | // Randomly remove 2 elements 76 | for (let i = 0; i < 2; i += 1) { 77 | let randomRemoveIndex = -1; 78 | while ((randomRemoveIndex < 0) || (randomRemoveIndex > singlyLinkedList.length() - 1)) { 79 | randomRemoveIndex = Math.floor((Math.random() * 10) + 1); 80 | } 81 | 82 | console.log(`Remove index: ${randomRemoveIndex}`); 83 | array.splice(randomRemoveIndex, 1); 84 | singlyLinkedList.remove(randomRemoveIndex); 85 | } 86 | 87 | let arrayString = 'Array after remove: '; 88 | let sllString = 'SinglyLinkedList after remove: '; 89 | for (let i = 0; i < randomSize - 2; i += 1) { 90 | arrayString += `${array[i]} `; 91 | sllString += `${singlyLinkedList.get(i)} `; 92 | } 93 | console.log(arrayString); 94 | console.log(sllString); 95 | 96 | // Check correct length and correct values 97 | if ((array.length === (randomSize - 2)) || (singlyLinkedList.length() === (randomSize - 2))) { 98 | for (let i = 0; i < randomSize - 2; i += 1) { 99 | if (array[i] !== singlyLinkedList.get(i)) return false; 100 | } 101 | return true; 102 | } 103 | return false; 104 | } 105 | } 106 | 107 | module.exports = singlyLinkedListTest; 108 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Inspiration 4 | 5 | Don't know where to start finding algorithms to implement? This project accepts implementations of CORE data structures and algorithms. Although this definition is a little vague, try picking up a textbook like this project's namesake [Algorithms + Data Structures = Programs](https://www.google.com/search?q=data+structures+%2B+algorithms+%3D+programs&oq=data+structures+%2B+algorithms+%3D+programs&aqs=chrome..69i57j69i61l3j69i60j35i39.5661j0j1&sourceid=chrome&ie=UTF-8) or the famous [Introduction To Algorithms (CLRS)](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844/ref=sr_1_1?s=books&ie=UTF8&qid=1499944366&sr=1-1&keywords=CLRS) and try implementing what you find in them! 6 | 7 | ## Process 8 | 9 | 1. Place implementations of data structures and algorithms in the `/data_structures` and `/algorithms` directories respectively. The implementation must be written as a `module.exports` function or object (refer to existing implementations) in its own file. 10 | 2. Add the necessary `require` or `import` statement to index.js 11 | 3. Update README.md to include the new implemented algorithm or data structure. 12 | 4. Open pull request to the repository for merging or feedback. 13 | 14 | ## Conventions 15 | 16 | ### Style 17 | 18 | We use the [Airbnb's Javascript Style Guide](https://github.com/airbnb/javascript) for writing Javascript using ES6. We use ESLint to ensure this standard throughout the project. 19 | 20 | File names are made using lowercamelcase with the first letter being lowercase, and each first letter of the following words being upper case (e.g. bubbleSort.js). 21 | 22 | ### Comments 23 | 24 | Comments are crucial to helping new developers write code (one of the goals of programjs). As such, we have a few guidelines for writing comments. 25 | 26 | All class implementations should begin with a brief multi-line comment giving a brief overview of the class as well as space/time efficiency using Big O notation for each function. Comments within each implementation will vary with the complexity of the code. For example, to explain a strange-looking or conterversial piece of code with other developers, a comment can look like `note: using a recursive function instead of loop to minimize runtime`. Comments should explain not what the code does, but WHY it is written a certain way. Comments to explain functions are not neccessary, as it is expected that the function and variable names will be intuitive. 27 | 28 | Overall, comment usage should be minimized in hopes of keeping files lightweight and easy for developers to get a sense of through code and code alone. 29 | 30 | ## Testing 31 | 32 | Each addition must have a unit tests in the `test` directory for the respective changes. Try to modularize as much as possible, breaking down each functionality into a different test. 33 | 34 | Add your test into `test/test.js` following existing format. Add your test with the `.only` descriptor to `describe` if testing an entire data structure, or `it` if a single part of a test. This way, during development, testing is much faster as it only runs the designated tests. For example, 35 | 36 | ```js 37 | describe.only('HashTable Test', () => { 38 | it('HashTable test for add() and search() and length()', () => { 39 | expect(hashTableTest.testAddandSearchandLength()).to.equal(true); 40 | }); 41 | it('HashTable test for remove()', () => { 42 | expect(hashTableTest.testRemove()).to.equal(true); 43 | }); 44 | }); 45 | ``` 46 | 47 | for the entire HashTable test or 48 | 49 | ```js 50 | describe('HashTable Test', () => { 51 | it('HashTable test for add() and search() and length()', () => { 52 | expect(hashTableTest.testAddandSearchandLength()).to.equal(true); 53 | }); 54 | it.only('HashTable test for remove()', () => { 55 | expect(hashTableTest.testRemove()).to.equal(true); 56 | }); 57 | }); 58 | ``` 59 | 60 | for only the remove test. 61 | 62 | However, make sure that you delete the `.only` descriptor to make sure that the entire module is tested. Before making a pull request, make sure that `yarn test` passes. 63 | 64 | ## Github 65 | 66 | All commits must start with upper case letters. 67 | 68 | ## Pull Request 69 | 70 | When creating a pull request, add @n3a9 and @kirubarajan as reviewers. Also make sure to have a detailed title, and add a small description if necessary. 71 | 72 | If you make major changes after a PR is approved, dismiss the reviews to ensure that your new code is reviewed as well. 73 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | const { expect } = require('chai'); 2 | 3 | const singlyLinkedListTest = require('./singlyLinkedListTest'); 4 | const doublyLinkedListTest = require('./doublyLinkedListTest'); 5 | const stackTest = require('./stackTest'); 6 | const queueTest = require('./queueTest'); 7 | const hashTableTest = require('./hashTableTest'); 8 | const binarySearchTreeTest = require('./binarySearchTreeTest'); 9 | 10 | const bubbleSortTest = require('./bubbleSortTest'); 11 | const insertionSortTest = require('./insertionSortTest'); 12 | const selectionSortTest = require('./selectionSortTest'); 13 | const quickSortTest = require('./quickSortTest'); 14 | const mergeSortTest = require('./mergeSortTest'); 15 | 16 | const factorialTest = require('./factorialTest'); 17 | const fibonacciTest = require('./fibonacciTest'); 18 | const combinationsTest = require('./combinationsTest'); 19 | const permutationsTest = require('./permutationsTest'); 20 | 21 | describe('SinglyLinkedList test', () => { 22 | it('SinglyLinkedList test for add() and get()', () => { 23 | expect(singlyLinkedListTest.testAddAndGet()).to.equal(true); 24 | }); 25 | it('SinglyLinkedList test for set()', () => { 26 | expect(singlyLinkedListTest.testSet()).to.equal(true); 27 | }); 28 | it('SinglyLinkedList test for remove()', () => { 29 | expect(singlyLinkedListTest.testRemove()).to.equal(true); 30 | }); 31 | }); 32 | 33 | 34 | describe('DoublyLinkedList test', () => { 35 | it('DoublyLinkedList test for add() and get()', () => { 36 | expect(doublyLinkedListTest.testAddAndGet()).to.equal(true); 37 | }); 38 | it('DoublyLinkedList test for add() at specific index and get()', () => { 39 | expect(doublyLinkedListTest.testSpecificAddAndGet()).to.equal(true); 40 | }); 41 | it('DoublyLinkedList test for set()', () => { 42 | expect(doublyLinkedListTest.testSet()).to.equal(true); 43 | }); 44 | it('DoublyLinkedList failed test for remove()', () => { 45 | expect(doublyLinkedListTest.testRemove()).to.equal(true); 46 | }); 47 | }); 48 | 49 | describe('Stack test', () => { 50 | it('Stack test for push()', () => { 51 | expect(stackTest.testPush()).to.equal(true); 52 | }); 53 | it('Stack test for peek()', () => { 54 | expect(stackTest.testPeek()).to.equal(true); 55 | }); 56 | it('Stack test for pop()', () => { 57 | expect(stackTest.testPop()).to.equal(true); 58 | }); 59 | it('Stack test for size()', () => { 60 | expect(stackTest.testSize()).to.equal(true); 61 | }); 62 | it('Stack test for clear() and isEmpty()', () => { 63 | expect(stackTest.testIsEmptyAndClear()).to.equal(true); 64 | }); 65 | }); 66 | 67 | describe('Queue test', () => { 68 | it('Queue test for enqueue()', () => { 69 | expect(queueTest.testEnqueue()).to.equal(true); 70 | }); 71 | it('Queue test for dequeue()', () => { 72 | expect(queueTest.testDequeue()).to.equal(true); 73 | }); 74 | it('Queue test for peek()', () => { 75 | expect(queueTest.testPeek()).to.equal(true); 76 | }); 77 | it('Queue test for size()', () => { 78 | expect(queueTest.testSize()).to.equal(true); 79 | }); 80 | it('Queue test for clear() and isEmpty()', () => { 81 | expect(queueTest.testIsEmptyAndClear()).to.equal(true); 82 | }); 83 | }); 84 | 85 | describe('HashTable Test', () => { 86 | it('HashTable test for add() and search() and length()', () => { 87 | expect(hashTableTest.testAddandSearchandLength()).to.equal(true); 88 | }); 89 | it('HashTable test for remove()', () => { 90 | expect(hashTableTest.testRemove()).to.equal(true); 91 | }); 92 | }); 93 | 94 | describe('BinarySearchTree - Inorder Traversal test', () => { 95 | it('BinarySearch tree test to give sorted list', () => { 96 | expect(binarySearchTreeTest()).to.equal(true); 97 | }); 98 | }); 99 | 100 | describe('Bubble sort test', () => { 101 | it('Bubble sort test to give sorted list', () => { 102 | expect(bubbleSortTest()).to.equal(true); 103 | }); 104 | }); 105 | 106 | describe('Inserti sort test', () => { 107 | it('Insertion sort test to give sorted list', () => { 108 | expect(insertionSortTest()).to.equal(true); 109 | }); 110 | }); 111 | 112 | describe('Selection sort test', () => { 113 | it('Selection sort test to give sorted list', () => { 114 | expect(selectionSortTest()).to.equal(true); 115 | }); 116 | }); 117 | 118 | describe('Merge sort test', () => { 119 | it('Merge sort test to give sorted list', () => { 120 | expect(mergeSortTest()).to.equal(true); 121 | }); 122 | }); 123 | 124 | describe('Quick sort test', () => { 125 | it('Quick sort test to give sorted list', () => { 126 | expect(quickSortTest()).to.equal(true); 127 | }); 128 | }); 129 | 130 | describe('Factorial test', () => { 131 | it('Factorial test failed', () => { 132 | expect(factorialTest()).to.equal(true); 133 | }); 134 | }); 135 | 136 | describe('Fibonacci test', () => { 137 | it('Fibonacci test failed', () => { 138 | expect(fibonacciTest()).to.equal(true); 139 | }); 140 | }); 141 | 142 | describe('Combinations test', () => { 143 | it('Combinations to provide correct answers', () => { 144 | expect(combinationsTest()).to.equal(true); 145 | }); 146 | }); 147 | 148 | describe('Permutations test', () => { 149 | it('Permutations to provide correct answers', () => { 150 | expect(permutationsTest()).to.equal(true); 151 | }); 152 | }); 153 | -------------------------------------------------------------------------------- /test/doublyLinkedListTest.js: -------------------------------------------------------------------------------- 1 | const DoublyLinkedList = require('../src/dataStructures/doublyLinkedList'); 2 | 3 | class doublyLinkedListTest { 4 | static testAddAndGet() { 5 | const array = []; 6 | const doublyLinkedList = new DoublyLinkedList(); 7 | const randomSize = Math.floor((Math.random() * 10) + 1); 8 | // Add a random number of randomly generated numbers 9 | let addElement; 10 | for (let i = 0; i < randomSize; i += 1) { 11 | addElement = Math.floor((Math.random() * 10) + 1); 12 | doublyLinkedList.add(addElement, null); 13 | array.push(addElement); 14 | } 15 | // Randomly request 3 elements from the list 16 | for (let i = 0; i < 3; i += 1) { 17 | if (i < randomSize - 1) { 18 | const doublyLinkedListValue = doublyLinkedList.get(i); 19 | const arrayValue = array[i]; 20 | console.log(`doublyLinkedList value: ${doublyLinkedListValue}`); 21 | console.log(`doublyLinkedList value: ${arrayValue}`); 22 | if (doublyLinkedListValue !== arrayValue) return false; 23 | } 24 | } 25 | return true; 26 | } 27 | 28 | static testSpecificAddAndGet() { 29 | const array = []; 30 | const doublyLinkedList = new DoublyLinkedList(); 31 | const randomSize = Math.floor((Math.random() * 10) + 3); 32 | // Add a random number of randomly generated numbers 33 | let addElement; 34 | for (let i = 0; i < randomSize; i += 1) { 35 | addElement = Math.floor((Math.random() * 10) + 1); 36 | doublyLinkedList.add(addElement, null); 37 | array.push(addElement); 38 | } 39 | 40 | let arrayString = 'Array before add: '; 41 | let dllString = 'DoublyLinkedList before add: '; 42 | for (let i = 0; i < randomSize; i += 1) { 43 | arrayString += `${array[i]} `; 44 | dllString += `${doublyLinkedList.get(i)} `; 45 | } 46 | console.log(arrayString); 47 | console.log(dllString); 48 | 49 | let addString = 'Elements to add in position 2 and 3: '; 50 | // Add random elements in position 2 and 3 51 | for (let i = 2; i < 4; i += 1) { 52 | addElement = Math.floor((Math.random() * 10) + 1); 53 | array.splice(i, 0, addElement); 54 | doublyLinkedList.add(addElement, i); 55 | addString += `${addElement} `; 56 | } 57 | console.log(addString); 58 | 59 | arrayString = 'Array after add: '; 60 | dllString = 'DoublyLinkedList after add: '; 61 | for (let i = 0; i < randomSize + 2; i += 1) { 62 | arrayString += `${array[i]} `; 63 | dllString += `${doublyLinkedList.get(i)} `; 64 | } 65 | console.log(arrayString); 66 | console.log(dllString); 67 | 68 | // Check correct length and correct values 69 | if ((array.length === (randomSize + 2)) || (doublyLinkedList.length() === (randomSize + 2))) { 70 | for (let i = 0; i < randomSize + 2; i += 1) { 71 | if (array[i] !== doublyLinkedList.get(i)) return false; 72 | } 73 | return true; 74 | } 75 | return false; 76 | } 77 | 78 | static testSet() { 79 | const array = []; 80 | const doublyLinkedList = new DoublyLinkedList(); 81 | let addElement; 82 | // Add 11 random elements into the DoublyLinkedList 83 | for (let i = 0; i < 11; i += 1) { 84 | addElement = Math.floor((Math.random() * 10) + 1); 85 | doublyLinkedList.add(addElement, null); 86 | array.push(addElement); 87 | } 88 | // Randomly set 3 elements 89 | for (let i = 0; i < 3; i += 1) { 90 | const randomElement = Math.floor((Math.random() * 10) + 1); 91 | const randomIndex = Math.floor((Math.random() * 10) + 1); 92 | 93 | array[randomIndex] = randomElement; 94 | doublyLinkedList.set(randomIndex, randomElement); 95 | 96 | const doublyLinkedListElement = doublyLinkedList.get(randomIndex); 97 | const arrayElement = array[randomIndex]; 98 | 99 | console.log(`doublyLinkedList value at index ${randomIndex}: ${doublyLinkedListElement} with reassign ${randomElement}`); 100 | console.log(`Array value at index ${randomIndex}: ${arrayElement} with reassign ${randomElement}`); 101 | if (arrayElement !== doublyLinkedListElement) return false; 102 | } 103 | 104 | return true; 105 | } 106 | 107 | static testRemove() { 108 | const array = []; 109 | const doublyLinkedList = new DoublyLinkedList(); 110 | const randomSize = Math.floor((Math.random() * 10) + 3); 111 | let randomElement; 112 | // Add a random number of elements 113 | for (let i = 0; i < randomSize; i += 1) { 114 | randomElement = Math.floor((Math.random() * 10) + 1); 115 | array.push(randomElement); 116 | doublyLinkedList.add(randomElement, null); 117 | } 118 | 119 | let initialList = 'Initial list: '; 120 | for (let i = 0; i < randomSize; i += 1) { 121 | initialList += `${array[i].toString()} `; 122 | } 123 | console.log(initialList); 124 | 125 | // Randomly remove 2 elements 126 | for (let i = 0; i < 2; i += 1) { 127 | let randomRemoveIndex = -1; 128 | while ((randomRemoveIndex < 0) || (randomRemoveIndex > doublyLinkedList.length() - 1)) { 129 | randomRemoveIndex = Math.floor((Math.random() * 10) + 1); 130 | } 131 | 132 | console.log(`Remove index: ${randomRemoveIndex}`); 133 | array.splice(randomRemoveIndex, 1); 134 | doublyLinkedList.remove(randomRemoveIndex); 135 | } 136 | 137 | let arrayString = 'Array after remove: '; 138 | let dllString = 'doublyLinkedList after remove: '; 139 | for (let i = 0; i < randomSize - 2; i += 1) { 140 | arrayString += `${array[i]} `; 141 | dllString += `${doublyLinkedList.get(i)} `; 142 | } 143 | console.log(arrayString); 144 | console.log(dllString); 145 | 146 | // Check correct length and correct values 147 | if ((array.length === (randomSize - 2)) || (doublyLinkedList.length() === (randomSize - 2))) { 148 | for (let i = 0; i < randomSize - 2; i += 1) { 149 | if (array[i] !== doublyLinkedList.get(i)) return false; 150 | } 151 | return true; 152 | } 153 | return false; 154 | } 155 | } 156 | 157 | module.exports = doublyLinkedListTest; 158 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@^7.0.0": 6 | version "7.0.0" 7 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" 8 | dependencies: 9 | "@babel/highlight" "^7.0.0" 10 | 11 | "@babel/highlight@^7.0.0": 12 | version "7.0.0" 13 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" 14 | dependencies: 15 | chalk "^2.0.0" 16 | esutils "^2.0.2" 17 | js-tokens "^4.0.0" 18 | 19 | acorn-jsx@^4.1.1: 20 | version "4.1.1" 21 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" 22 | dependencies: 23 | acorn "^5.0.3" 24 | 25 | acorn@^5.0.3, acorn@^5.6.0: 26 | version "5.7.3" 27 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" 28 | 29 | ajv@^6.5.3: 30 | version "6.5.4" 31 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.4.tgz#247d5274110db653706b550fcc2b797ca28cfc59" 32 | dependencies: 33 | fast-deep-equal "^2.0.1" 34 | fast-json-stable-stringify "^2.0.0" 35 | json-schema-traverse "^0.4.1" 36 | uri-js "^4.2.2" 37 | 38 | ansi-escapes@^3.0.0: 39 | version "3.1.0" 40 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" 41 | 42 | ansi-regex@^3.0.0: 43 | version "3.0.0" 44 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 45 | 46 | ansi-styles@^3.2.1: 47 | version "3.2.1" 48 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 49 | dependencies: 50 | color-convert "^1.9.0" 51 | 52 | argparse@^1.0.7: 53 | version "1.0.10" 54 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 55 | dependencies: 56 | sprintf-js "~1.0.2" 57 | 58 | aria-query@^3.0.0: 59 | version "3.0.0" 60 | resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" 61 | dependencies: 62 | ast-types-flow "0.0.7" 63 | commander "^2.11.0" 64 | 65 | array-includes@^3.0.3: 66 | version "3.0.3" 67 | resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" 68 | dependencies: 69 | define-properties "^1.1.2" 70 | es-abstract "^1.7.0" 71 | 72 | array-union@^1.0.1: 73 | version "1.0.2" 74 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 75 | dependencies: 76 | array-uniq "^1.0.1" 77 | 78 | array-uniq@^1.0.1: 79 | version "1.0.3" 80 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 81 | 82 | arrify@^1.0.0: 83 | version "1.0.1" 84 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 85 | 86 | assertion-error@^1.1.0: 87 | version "1.1.0" 88 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" 89 | 90 | ast-types-flow@0.0.7, ast-types-flow@^0.0.7: 91 | version "0.0.7" 92 | resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" 93 | 94 | axobject-query@^2.0.1: 95 | version "2.0.1" 96 | resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.1.tgz#05dfa705ada8ad9db993fa6896f22d395b0b0a07" 97 | dependencies: 98 | ast-types-flow "0.0.7" 99 | 100 | balanced-match@^1.0.0: 101 | version "1.0.0" 102 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 103 | 104 | brace-expansion@^1.1.7: 105 | version "1.1.11" 106 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 107 | dependencies: 108 | balanced-match "^1.0.0" 109 | concat-map "0.0.1" 110 | 111 | browser-stdout@1.3.1: 112 | version "1.3.1" 113 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" 114 | 115 | builtin-modules@^1.0.0: 116 | version "1.1.1" 117 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 118 | 119 | caller-path@^0.1.0: 120 | version "0.1.0" 121 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 122 | dependencies: 123 | callsites "^0.2.0" 124 | 125 | callsites@^0.2.0: 126 | version "0.2.0" 127 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 128 | 129 | chai@^4.2.0: 130 | version "4.2.0" 131 | resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" 132 | dependencies: 133 | assertion-error "^1.1.0" 134 | check-error "^1.0.2" 135 | deep-eql "^3.0.1" 136 | get-func-name "^2.0.0" 137 | pathval "^1.1.0" 138 | type-detect "^4.0.5" 139 | 140 | chalk@^2.0.0, chalk@^2.1.0: 141 | version "2.4.1" 142 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 143 | dependencies: 144 | ansi-styles "^3.2.1" 145 | escape-string-regexp "^1.0.5" 146 | supports-color "^5.3.0" 147 | 148 | chardet@^0.7.0: 149 | version "0.7.0" 150 | resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" 151 | 152 | check-error@^1.0.2: 153 | version "1.0.2" 154 | resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" 155 | 156 | circular-json@^0.3.1: 157 | version "0.3.3" 158 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" 159 | 160 | cli-cursor@^2.1.0: 161 | version "2.1.0" 162 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" 163 | dependencies: 164 | restore-cursor "^2.0.0" 165 | 166 | cli-width@^2.0.0: 167 | version "2.2.0" 168 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" 169 | 170 | color-convert@^1.9.0: 171 | version "1.9.3" 172 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 173 | dependencies: 174 | color-name "1.1.3" 175 | 176 | color-name@1.1.3: 177 | version "1.1.3" 178 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 179 | 180 | commander@2.15.1: 181 | version "2.15.1" 182 | resolved "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" 183 | 184 | commander@^2.11.0: 185 | version "2.19.0" 186 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" 187 | 188 | concat-map@0.0.1: 189 | version "0.0.1" 190 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 191 | 192 | contains-path@^0.1.0: 193 | version "0.1.0" 194 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 195 | 196 | cross-spawn@^6.0.5: 197 | version "6.0.5" 198 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" 199 | dependencies: 200 | nice-try "^1.0.4" 201 | path-key "^2.0.1" 202 | semver "^5.5.0" 203 | shebang-command "^1.2.0" 204 | which "^1.2.9" 205 | 206 | damerau-levenshtein@^1.0.4: 207 | version "1.0.4" 208 | resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" 209 | 210 | debug@3.1.0: 211 | version "3.1.0" 212 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 213 | dependencies: 214 | ms "2.0.0" 215 | 216 | debug@^2.6.8, debug@^2.6.9: 217 | version "2.6.9" 218 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 219 | dependencies: 220 | ms "2.0.0" 221 | 222 | debug@^4.0.1: 223 | version "4.1.0" 224 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" 225 | dependencies: 226 | ms "^2.1.1" 227 | 228 | deep-eql@^3.0.1: 229 | version "3.0.1" 230 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" 231 | dependencies: 232 | type-detect "^4.0.0" 233 | 234 | deep-is@~0.1.3: 235 | version "0.1.3" 236 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 237 | 238 | define-properties@^1.1.2: 239 | version "1.1.3" 240 | resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" 241 | dependencies: 242 | object-keys "^1.0.12" 243 | 244 | del@^2.0.2: 245 | version "2.2.2" 246 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 247 | dependencies: 248 | globby "^5.0.0" 249 | is-path-cwd "^1.0.0" 250 | is-path-in-cwd "^1.0.0" 251 | object-assign "^4.0.1" 252 | pify "^2.0.0" 253 | pinkie-promise "^2.0.0" 254 | rimraf "^2.2.8" 255 | 256 | diff@3.5.0: 257 | version "3.5.0" 258 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" 259 | 260 | doctrine@1.5.0: 261 | version "1.5.0" 262 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 263 | dependencies: 264 | esutils "^2.0.2" 265 | isarray "^1.0.0" 266 | 267 | doctrine@^2.1.0: 268 | version "2.1.0" 269 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" 270 | dependencies: 271 | esutils "^2.0.2" 272 | 273 | emoji-regex@^6.5.1: 274 | version "6.5.1" 275 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" 276 | 277 | error-ex@^1.2.0: 278 | version "1.3.2" 279 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 280 | dependencies: 281 | is-arrayish "^0.2.1" 282 | 283 | es-abstract@^1.6.1, es-abstract@^1.7.0: 284 | version "1.12.0" 285 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" 286 | dependencies: 287 | es-to-primitive "^1.1.1" 288 | function-bind "^1.1.1" 289 | has "^1.0.1" 290 | is-callable "^1.1.3" 291 | is-regex "^1.0.4" 292 | 293 | es-to-primitive@^1.1.1: 294 | version "1.2.0" 295 | resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" 296 | dependencies: 297 | is-callable "^1.1.4" 298 | is-date-object "^1.0.1" 299 | is-symbol "^1.0.2" 300 | 301 | escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: 302 | version "1.0.5" 303 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 304 | 305 | eslint-config-airbnb-base@^13.1.0: 306 | version "13.1.0" 307 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz#b5a1b480b80dfad16433d6c4ad84e6605052c05c" 308 | dependencies: 309 | eslint-restricted-globals "^0.1.1" 310 | object.assign "^4.1.0" 311 | object.entries "^1.0.4" 312 | 313 | eslint-config-airbnb@^17.1.0: 314 | version "17.1.0" 315 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-17.1.0.tgz#3964ed4bc198240315ff52030bf8636f42bc4732" 316 | dependencies: 317 | eslint-config-airbnb-base "^13.1.0" 318 | object.assign "^4.1.0" 319 | object.entries "^1.0.4" 320 | 321 | eslint-import-resolver-node@^0.3.1: 322 | version "0.3.2" 323 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" 324 | dependencies: 325 | debug "^2.6.9" 326 | resolve "^1.5.0" 327 | 328 | eslint-module-utils@^2.2.0: 329 | version "2.2.0" 330 | resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" 331 | dependencies: 332 | debug "^2.6.8" 333 | pkg-dir "^1.0.0" 334 | 335 | eslint-plugin-import@^2.14.0: 336 | version "2.14.0" 337 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz#6b17626d2e3e6ad52cfce8807a845d15e22111a8" 338 | dependencies: 339 | contains-path "^0.1.0" 340 | debug "^2.6.8" 341 | doctrine "1.5.0" 342 | eslint-import-resolver-node "^0.3.1" 343 | eslint-module-utils "^2.2.0" 344 | has "^1.0.1" 345 | lodash "^4.17.4" 346 | minimatch "^3.0.3" 347 | read-pkg-up "^2.0.0" 348 | resolve "^1.6.0" 349 | 350 | eslint-plugin-jsx-a11y@^6.1.2: 351 | version "6.1.2" 352 | resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.1.2.tgz#69bca4890b36dcf0fe16dd2129d2d88b98f33f88" 353 | dependencies: 354 | aria-query "^3.0.0" 355 | array-includes "^3.0.3" 356 | ast-types-flow "^0.0.7" 357 | axobject-query "^2.0.1" 358 | damerau-levenshtein "^1.0.4" 359 | emoji-regex "^6.5.1" 360 | has "^1.0.3" 361 | jsx-ast-utils "^2.0.1" 362 | 363 | eslint-plugin-react@^7.11.1: 364 | version "7.11.1" 365 | resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" 366 | dependencies: 367 | array-includes "^3.0.3" 368 | doctrine "^2.1.0" 369 | has "^1.0.3" 370 | jsx-ast-utils "^2.0.1" 371 | prop-types "^15.6.2" 372 | 373 | eslint-restricted-globals@^0.1.1: 374 | version "0.1.1" 375 | resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" 376 | 377 | eslint-scope@^4.0.0: 378 | version "4.0.0" 379 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" 380 | dependencies: 381 | esrecurse "^4.1.0" 382 | estraverse "^4.1.1" 383 | 384 | eslint-utils@^1.3.1: 385 | version "1.3.1" 386 | resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" 387 | 388 | eslint-visitor-keys@^1.0.0: 389 | version "1.0.0" 390 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" 391 | 392 | eslint@^5.8.0: 393 | version "5.8.0" 394 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.8.0.tgz#91fbf24f6e0471e8fdf681a4d9dd1b2c9f28309b" 395 | dependencies: 396 | "@babel/code-frame" "^7.0.0" 397 | ajv "^6.5.3" 398 | chalk "^2.1.0" 399 | cross-spawn "^6.0.5" 400 | debug "^4.0.1" 401 | doctrine "^2.1.0" 402 | eslint-scope "^4.0.0" 403 | eslint-utils "^1.3.1" 404 | eslint-visitor-keys "^1.0.0" 405 | espree "^4.0.0" 406 | esquery "^1.0.1" 407 | esutils "^2.0.2" 408 | file-entry-cache "^2.0.0" 409 | functional-red-black-tree "^1.0.1" 410 | glob "^7.1.2" 411 | globals "^11.7.0" 412 | ignore "^4.0.6" 413 | imurmurhash "^0.1.4" 414 | inquirer "^6.1.0" 415 | is-resolvable "^1.1.0" 416 | js-yaml "^3.12.0" 417 | json-stable-stringify-without-jsonify "^1.0.1" 418 | levn "^0.3.0" 419 | lodash "^4.17.5" 420 | minimatch "^3.0.4" 421 | mkdirp "^0.5.1" 422 | natural-compare "^1.4.0" 423 | optionator "^0.8.2" 424 | path-is-inside "^1.0.2" 425 | pluralize "^7.0.0" 426 | progress "^2.0.0" 427 | regexpp "^2.0.1" 428 | require-uncached "^1.0.3" 429 | semver "^5.5.1" 430 | strip-ansi "^4.0.0" 431 | strip-json-comments "^2.0.1" 432 | table "^5.0.2" 433 | text-table "^0.2.0" 434 | 435 | espree@^4.0.0: 436 | version "4.0.0" 437 | resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" 438 | dependencies: 439 | acorn "^5.6.0" 440 | acorn-jsx "^4.1.1" 441 | 442 | esprima@^4.0.0: 443 | version "4.0.1" 444 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 445 | 446 | esquery@^1.0.1: 447 | version "1.0.1" 448 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" 449 | dependencies: 450 | estraverse "^4.0.0" 451 | 452 | esrecurse@^4.1.0: 453 | version "4.2.1" 454 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" 455 | dependencies: 456 | estraverse "^4.1.0" 457 | 458 | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: 459 | version "4.2.0" 460 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 461 | 462 | esutils@^2.0.2: 463 | version "2.0.2" 464 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 465 | 466 | external-editor@^3.0.0: 467 | version "3.0.3" 468 | resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" 469 | dependencies: 470 | chardet "^0.7.0" 471 | iconv-lite "^0.4.24" 472 | tmp "^0.0.33" 473 | 474 | fast-deep-equal@^2.0.1: 475 | version "2.0.1" 476 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" 477 | 478 | fast-json-stable-stringify@^2.0.0: 479 | version "2.0.0" 480 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" 481 | 482 | fast-levenshtein@~2.0.4: 483 | version "2.0.6" 484 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 485 | 486 | figures@^2.0.0: 487 | version "2.0.0" 488 | resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" 489 | dependencies: 490 | escape-string-regexp "^1.0.5" 491 | 492 | file-entry-cache@^2.0.0: 493 | version "2.0.0" 494 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 495 | dependencies: 496 | flat-cache "^1.2.1" 497 | object-assign "^4.0.1" 498 | 499 | find-up@^1.0.0: 500 | version "1.1.2" 501 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 502 | dependencies: 503 | path-exists "^2.0.0" 504 | pinkie-promise "^2.0.0" 505 | 506 | find-up@^2.0.0: 507 | version "2.1.0" 508 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 509 | dependencies: 510 | locate-path "^2.0.0" 511 | 512 | flat-cache@^1.2.1: 513 | version "1.3.0" 514 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" 515 | dependencies: 516 | circular-json "^0.3.1" 517 | del "^2.0.2" 518 | graceful-fs "^4.1.2" 519 | write "^0.2.1" 520 | 521 | fs.realpath@^1.0.0: 522 | version "1.0.0" 523 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 524 | 525 | function-bind@^1.1.0, function-bind@^1.1.1: 526 | version "1.1.1" 527 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 528 | 529 | functional-red-black-tree@^1.0.1: 530 | version "1.0.1" 531 | resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" 532 | 533 | get-func-name@^2.0.0: 534 | version "2.0.0" 535 | resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" 536 | 537 | glob@7.1.2: 538 | version "7.1.2" 539 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" 540 | dependencies: 541 | fs.realpath "^1.0.0" 542 | inflight "^1.0.4" 543 | inherits "2" 544 | minimatch "^3.0.4" 545 | once "^1.3.0" 546 | path-is-absolute "^1.0.0" 547 | 548 | glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: 549 | version "7.1.3" 550 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 551 | dependencies: 552 | fs.realpath "^1.0.0" 553 | inflight "^1.0.4" 554 | inherits "2" 555 | minimatch "^3.0.4" 556 | once "^1.3.0" 557 | path-is-absolute "^1.0.0" 558 | 559 | globals@^11.7.0: 560 | version "11.8.0" 561 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.8.0.tgz#c1ef45ee9bed6badf0663c5cb90e8d1adec1321d" 562 | 563 | globby@^5.0.0: 564 | version "5.0.0" 565 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 566 | dependencies: 567 | array-union "^1.0.1" 568 | arrify "^1.0.0" 569 | glob "^7.0.3" 570 | object-assign "^4.0.1" 571 | pify "^2.0.0" 572 | pinkie-promise "^2.0.0" 573 | 574 | graceful-fs@^4.1.2: 575 | version "4.1.11" 576 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 577 | 578 | growl@1.10.5: 579 | version "1.10.5" 580 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" 581 | 582 | has-flag@^3.0.0: 583 | version "3.0.0" 584 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 585 | 586 | has-symbols@^1.0.0: 587 | version "1.0.0" 588 | resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" 589 | 590 | has@^1.0.1, has@^1.0.3: 591 | version "1.0.3" 592 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 593 | dependencies: 594 | function-bind "^1.1.1" 595 | 596 | he@1.1.1: 597 | version "1.1.1" 598 | resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" 599 | 600 | hosted-git-info@^2.1.4: 601 | version "2.7.1" 602 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" 603 | 604 | iconv-lite@^0.4.24: 605 | version "0.4.24" 606 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" 607 | dependencies: 608 | safer-buffer ">= 2.1.2 < 3" 609 | 610 | ignore@^4.0.6: 611 | version "4.0.6" 612 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" 613 | 614 | imurmurhash@^0.1.4: 615 | version "0.1.4" 616 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 617 | 618 | inflight@^1.0.4: 619 | version "1.0.6" 620 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 621 | dependencies: 622 | once "^1.3.0" 623 | wrappy "1" 624 | 625 | inherits@2: 626 | version "2.0.3" 627 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 628 | 629 | inquirer@^6.1.0: 630 | version "6.2.0" 631 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" 632 | dependencies: 633 | ansi-escapes "^3.0.0" 634 | chalk "^2.0.0" 635 | cli-cursor "^2.1.0" 636 | cli-width "^2.0.0" 637 | external-editor "^3.0.0" 638 | figures "^2.0.0" 639 | lodash "^4.17.10" 640 | mute-stream "0.0.7" 641 | run-async "^2.2.0" 642 | rxjs "^6.1.0" 643 | string-width "^2.1.0" 644 | strip-ansi "^4.0.0" 645 | through "^2.3.6" 646 | 647 | is-arrayish@^0.2.1: 648 | version "0.2.1" 649 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 650 | 651 | is-builtin-module@^1.0.0: 652 | version "1.0.0" 653 | resolved "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 654 | dependencies: 655 | builtin-modules "^1.0.0" 656 | 657 | is-callable@^1.1.3, is-callable@^1.1.4: 658 | version "1.1.4" 659 | resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" 660 | 661 | is-date-object@^1.0.1: 662 | version "1.0.1" 663 | resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 664 | 665 | is-fullwidth-code-point@^2.0.0: 666 | version "2.0.0" 667 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 668 | 669 | is-path-cwd@^1.0.0: 670 | version "1.0.0" 671 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 672 | 673 | is-path-in-cwd@^1.0.0: 674 | version "1.0.1" 675 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" 676 | dependencies: 677 | is-path-inside "^1.0.0" 678 | 679 | is-path-inside@^1.0.0: 680 | version "1.0.1" 681 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" 682 | dependencies: 683 | path-is-inside "^1.0.1" 684 | 685 | is-promise@^2.1.0: 686 | version "2.1.0" 687 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 688 | 689 | is-regex@^1.0.4: 690 | version "1.0.4" 691 | resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 692 | dependencies: 693 | has "^1.0.1" 694 | 695 | is-resolvable@^1.1.0: 696 | version "1.1.0" 697 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" 698 | 699 | is-symbol@^1.0.2: 700 | version "1.0.2" 701 | resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" 702 | dependencies: 703 | has-symbols "^1.0.0" 704 | 705 | isarray@^1.0.0: 706 | version "1.0.0" 707 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 708 | 709 | isexe@^2.0.0: 710 | version "2.0.0" 711 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 712 | 713 | "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: 714 | version "4.0.0" 715 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 716 | 717 | js-yaml@^3.12.0: 718 | version "3.12.0" 719 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" 720 | dependencies: 721 | argparse "^1.0.7" 722 | esprima "^4.0.0" 723 | 724 | json-schema-traverse@^0.4.1: 725 | version "0.4.1" 726 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 727 | 728 | json-stable-stringify-without-jsonify@^1.0.1: 729 | version "1.0.1" 730 | resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 731 | 732 | jsx-ast-utils@^2.0.1: 733 | version "2.0.1" 734 | resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" 735 | dependencies: 736 | array-includes "^3.0.3" 737 | 738 | levn@^0.3.0, levn@~0.3.0: 739 | version "0.3.0" 740 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 741 | dependencies: 742 | prelude-ls "~1.1.2" 743 | type-check "~0.3.2" 744 | 745 | load-json-file@^2.0.0: 746 | version "2.0.0" 747 | resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" 748 | dependencies: 749 | graceful-fs "^4.1.2" 750 | parse-json "^2.2.0" 751 | pify "^2.0.0" 752 | strip-bom "^3.0.0" 753 | 754 | locate-path@^2.0.0: 755 | version "2.0.0" 756 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 757 | dependencies: 758 | p-locate "^2.0.0" 759 | path-exists "^3.0.0" 760 | 761 | lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5: 762 | version "4.17.11" 763 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" 764 | 765 | loose-envify@^1.3.1: 766 | version "1.4.0" 767 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" 768 | dependencies: 769 | js-tokens "^3.0.0 || ^4.0.0" 770 | 771 | mimic-fn@^1.0.0: 772 | version "1.2.0" 773 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" 774 | 775 | minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: 776 | version "3.0.4" 777 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 778 | dependencies: 779 | brace-expansion "^1.1.7" 780 | 781 | minimist@0.0.8: 782 | version "0.0.8" 783 | resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 784 | 785 | mkdirp@0.5.1, mkdirp@^0.5.1: 786 | version "0.5.1" 787 | resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 788 | dependencies: 789 | minimist "0.0.8" 790 | 791 | mocha@^5.2.0: 792 | version "5.2.0" 793 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" 794 | dependencies: 795 | browser-stdout "1.3.1" 796 | commander "2.15.1" 797 | debug "3.1.0" 798 | diff "3.5.0" 799 | escape-string-regexp "1.0.5" 800 | glob "7.1.2" 801 | growl "1.10.5" 802 | he "1.1.1" 803 | minimatch "3.0.4" 804 | mkdirp "0.5.1" 805 | supports-color "5.4.0" 806 | 807 | ms@2.0.0: 808 | version "2.0.0" 809 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 810 | 811 | ms@^2.1.1: 812 | version "2.1.1" 813 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" 814 | 815 | mute-stream@0.0.7: 816 | version "0.0.7" 817 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" 818 | 819 | natural-compare@^1.4.0: 820 | version "1.4.0" 821 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 822 | 823 | nice-try@^1.0.4: 824 | version "1.0.5" 825 | resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" 826 | 827 | normalize-package-data@^2.3.2: 828 | version "2.4.0" 829 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 830 | dependencies: 831 | hosted-git-info "^2.1.4" 832 | is-builtin-module "^1.0.0" 833 | semver "2 || 3 || 4 || 5" 834 | validate-npm-package-license "^3.0.1" 835 | 836 | object-assign@^4.0.1, object-assign@^4.1.1: 837 | version "4.1.1" 838 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 839 | 840 | object-keys@^1.0.11, object-keys@^1.0.12: 841 | version "1.0.12" 842 | resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" 843 | 844 | object.assign@^4.1.0: 845 | version "4.1.0" 846 | resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" 847 | dependencies: 848 | define-properties "^1.1.2" 849 | function-bind "^1.1.1" 850 | has-symbols "^1.0.0" 851 | object-keys "^1.0.11" 852 | 853 | object.entries@^1.0.4: 854 | version "1.0.4" 855 | resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" 856 | dependencies: 857 | define-properties "^1.1.2" 858 | es-abstract "^1.6.1" 859 | function-bind "^1.1.0" 860 | has "^1.0.1" 861 | 862 | once@^1.3.0: 863 | version "1.4.0" 864 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 865 | dependencies: 866 | wrappy "1" 867 | 868 | onetime@^2.0.0: 869 | version "2.0.1" 870 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" 871 | dependencies: 872 | mimic-fn "^1.0.0" 873 | 874 | optionator@^0.8.2: 875 | version "0.8.2" 876 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 877 | dependencies: 878 | deep-is "~0.1.3" 879 | fast-levenshtein "~2.0.4" 880 | levn "~0.3.0" 881 | prelude-ls "~1.1.2" 882 | type-check "~0.3.2" 883 | wordwrap "~1.0.0" 884 | 885 | os-tmpdir@~1.0.2: 886 | version "1.0.2" 887 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 888 | 889 | p-limit@^1.1.0: 890 | version "1.3.0" 891 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" 892 | dependencies: 893 | p-try "^1.0.0" 894 | 895 | p-locate@^2.0.0: 896 | version "2.0.0" 897 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 898 | dependencies: 899 | p-limit "^1.1.0" 900 | 901 | p-try@^1.0.0: 902 | version "1.0.0" 903 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 904 | 905 | parse-json@^2.2.0: 906 | version "2.2.0" 907 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 908 | dependencies: 909 | error-ex "^1.2.0" 910 | 911 | path-exists@^2.0.0: 912 | version "2.1.0" 913 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 914 | dependencies: 915 | pinkie-promise "^2.0.0" 916 | 917 | path-exists@^3.0.0: 918 | version "3.0.0" 919 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 920 | 921 | path-is-absolute@^1.0.0: 922 | version "1.0.1" 923 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 924 | 925 | path-is-inside@^1.0.1, path-is-inside@^1.0.2: 926 | version "1.0.2" 927 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 928 | 929 | path-key@^2.0.1: 930 | version "2.0.1" 931 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 932 | 933 | path-parse@^1.0.5: 934 | version "1.0.6" 935 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 936 | 937 | path-type@^2.0.0: 938 | version "2.0.0" 939 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" 940 | dependencies: 941 | pify "^2.0.0" 942 | 943 | pathval@^1.1.0: 944 | version "1.1.0" 945 | resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" 946 | 947 | pify@^2.0.0: 948 | version "2.3.0" 949 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 950 | 951 | pinkie-promise@^2.0.0: 952 | version "2.0.1" 953 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 954 | dependencies: 955 | pinkie "^2.0.0" 956 | 957 | pinkie@^2.0.0: 958 | version "2.0.4" 959 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 960 | 961 | pkg-dir@^1.0.0: 962 | version "1.0.0" 963 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" 964 | dependencies: 965 | find-up "^1.0.0" 966 | 967 | pluralize@^7.0.0: 968 | version "7.0.0" 969 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" 970 | 971 | prelude-ls@~1.1.2: 972 | version "1.1.2" 973 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 974 | 975 | progress@^2.0.0: 976 | version "2.0.0" 977 | resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" 978 | 979 | prop-types@^15.6.2: 980 | version "15.6.2" 981 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" 982 | dependencies: 983 | loose-envify "^1.3.1" 984 | object-assign "^4.1.1" 985 | 986 | punycode@^2.1.0: 987 | version "2.1.1" 988 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 989 | 990 | read-pkg-up@^2.0.0: 991 | version "2.0.0" 992 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" 993 | dependencies: 994 | find-up "^2.0.0" 995 | read-pkg "^2.0.0" 996 | 997 | read-pkg@^2.0.0: 998 | version "2.0.0" 999 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" 1000 | dependencies: 1001 | load-json-file "^2.0.0" 1002 | normalize-package-data "^2.3.2" 1003 | path-type "^2.0.0" 1004 | 1005 | regexpp@^2.0.1: 1006 | version "2.0.1" 1007 | resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" 1008 | 1009 | require-uncached@^1.0.3: 1010 | version "1.0.3" 1011 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 1012 | dependencies: 1013 | caller-path "^0.1.0" 1014 | resolve-from "^1.0.0" 1015 | 1016 | resolve-from@^1.0.0: 1017 | version "1.0.1" 1018 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 1019 | 1020 | resolve@^1.5.0, resolve@^1.6.0: 1021 | version "1.8.1" 1022 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" 1023 | dependencies: 1024 | path-parse "^1.0.5" 1025 | 1026 | restore-cursor@^2.0.0: 1027 | version "2.0.0" 1028 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" 1029 | dependencies: 1030 | onetime "^2.0.0" 1031 | signal-exit "^3.0.2" 1032 | 1033 | rimraf@^2.2.8: 1034 | version "2.6.2" 1035 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" 1036 | dependencies: 1037 | glob "^7.0.5" 1038 | 1039 | run-async@^2.2.0: 1040 | version "2.3.0" 1041 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" 1042 | dependencies: 1043 | is-promise "^2.1.0" 1044 | 1045 | rxjs@^6.1.0: 1046 | version "6.3.3" 1047 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" 1048 | dependencies: 1049 | tslib "^1.9.0" 1050 | 1051 | "safer-buffer@>= 2.1.2 < 3": 1052 | version "2.1.2" 1053 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 1054 | 1055 | "semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1: 1056 | version "5.5.1" 1057 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" 1058 | 1059 | shebang-command@^1.2.0: 1060 | version "1.2.0" 1061 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 1062 | dependencies: 1063 | shebang-regex "^1.0.0" 1064 | 1065 | shebang-regex@^1.0.0: 1066 | version "1.0.0" 1067 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 1068 | 1069 | signal-exit@^3.0.2: 1070 | version "3.0.2" 1071 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 1072 | 1073 | slice-ansi@1.0.0: 1074 | version "1.0.0" 1075 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" 1076 | dependencies: 1077 | is-fullwidth-code-point "^2.0.0" 1078 | 1079 | spdx-correct@^3.0.0: 1080 | version "3.0.2" 1081 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" 1082 | dependencies: 1083 | spdx-expression-parse "^3.0.0" 1084 | spdx-license-ids "^3.0.0" 1085 | 1086 | spdx-exceptions@^2.1.0: 1087 | version "2.2.0" 1088 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 1089 | 1090 | spdx-expression-parse@^3.0.0: 1091 | version "3.0.0" 1092 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 1093 | dependencies: 1094 | spdx-exceptions "^2.1.0" 1095 | spdx-license-ids "^3.0.0" 1096 | 1097 | spdx-license-ids@^3.0.0: 1098 | version "3.0.1" 1099 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz#e2a303236cac54b04031fa7a5a79c7e701df852f" 1100 | 1101 | sprintf-js@~1.0.2: 1102 | version "1.0.3" 1103 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1104 | 1105 | string-width@^2.1.0, string-width@^2.1.1: 1106 | version "2.1.1" 1107 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 1108 | dependencies: 1109 | is-fullwidth-code-point "^2.0.0" 1110 | strip-ansi "^4.0.0" 1111 | 1112 | strip-ansi@^4.0.0: 1113 | version "4.0.0" 1114 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 1115 | dependencies: 1116 | ansi-regex "^3.0.0" 1117 | 1118 | strip-bom@^3.0.0: 1119 | version "3.0.0" 1120 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1121 | 1122 | strip-json-comments@^2.0.1: 1123 | version "2.0.1" 1124 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1125 | 1126 | supports-color@5.4.0: 1127 | version "5.4.0" 1128 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" 1129 | dependencies: 1130 | has-flag "^3.0.0" 1131 | 1132 | supports-color@^5.3.0: 1133 | version "5.5.0" 1134 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 1135 | dependencies: 1136 | has-flag "^3.0.0" 1137 | 1138 | table@^5.0.2: 1139 | version "5.1.0" 1140 | resolved "https://registry.yarnpkg.com/table/-/table-5.1.0.tgz#69a54644f6f01ad1628f8178715b408dc6bf11f7" 1141 | dependencies: 1142 | ajv "^6.5.3" 1143 | lodash "^4.17.10" 1144 | slice-ansi "1.0.0" 1145 | string-width "^2.1.1" 1146 | 1147 | text-table@^0.2.0: 1148 | version "0.2.0" 1149 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1150 | 1151 | through@^2.3.6: 1152 | version "2.3.8" 1153 | resolved "http://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1154 | 1155 | tmp@^0.0.33: 1156 | version "0.0.33" 1157 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 1158 | dependencies: 1159 | os-tmpdir "~1.0.2" 1160 | 1161 | tslib@^1.9.0: 1162 | version "1.9.3" 1163 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" 1164 | 1165 | type-check@~0.3.2: 1166 | version "0.3.2" 1167 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1168 | dependencies: 1169 | prelude-ls "~1.1.2" 1170 | 1171 | type-detect@^4.0.0, type-detect@^4.0.5: 1172 | version "4.0.8" 1173 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" 1174 | 1175 | uri-js@^4.2.2: 1176 | version "4.2.2" 1177 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 1178 | dependencies: 1179 | punycode "^2.1.0" 1180 | 1181 | validate-npm-package-license@^3.0.1: 1182 | version "3.0.4" 1183 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 1184 | dependencies: 1185 | spdx-correct "^3.0.0" 1186 | spdx-expression-parse "^3.0.0" 1187 | 1188 | which@^1.2.9: 1189 | version "1.3.1" 1190 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 1191 | dependencies: 1192 | isexe "^2.0.0" 1193 | 1194 | wordwrap@~1.0.0: 1195 | version "1.0.0" 1196 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1197 | 1198 | wrappy@1: 1199 | version "1.0.2" 1200 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1201 | 1202 | write@^0.2.1: 1203 | version "0.2.1" 1204 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 1205 | dependencies: 1206 | mkdirp "^0.5.1" 1207 | --------------------------------------------------------------------------------