How to use the heap.default function in heap

To help you get started, we’ve selected a few heap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JohnSimerlink / branches_front_end_private / app / core / store / store.ts View on Github external
import {getters} from './store_getters'
import {IFlashcardTreeData} from '../../objects/flashcardTree/IFlashcardTreeData'
import {INTERACTION_MODES} from './interactionModes';
import {FlashcardTreeUtils} from '../../objects/flashcardTree/FlashcardTreeUtils';
import {printStateOfFlashcardTreeHeap} from '../../objects/flashcardTree/HeapUtils';
import {getUserInfoFromEmailLoginResult} from '../../objects/user/userHelper';
import {
	messageReviewNotification,
	messageError,
	messageNotification
} from '../../message';
import {getOverdueMessageFromContent} from '../../loaders/contentUser/ContentUserLoaderAndOverdueListener';
import moment = require('moment');
import {ProficiencyUtils} from '../../objects/proficiency/ProficiencyUtils';

const Heap = require('heap').default || require('heap')
let Vue = require('vue').default || require('vue');
Vue.use(Vuex);

const mutations = {
	[MUTATION_NAMES.DISPLAY_NEXT_REVIEW_TIME_MESSAGE](state: IState, {points, nextReviewTimeString, color}: IDisplayNextReviewTimeMessageMutationArgs) {

		const ptsString: string = points > 0 ? `+${Math.floor(points)}` : '' + Math.floor(points);
		const text = `${ptsString} pts! Review ${nextReviewTimeString}`;
		messageNotification(
			{
				// backgroundColor,
				color,
				text,
				onclick: (snack) => {
					snack.hide();
				}

heap

binary heap (priority queue) algorithms (ported from Python's heapq module)

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis