Socket
Socket
Sign inDemoInstall

@hapi/topo

Package Overview
Dependencies
1
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.5 to 4.0.0

lib/index.d.ts

2

lib/index.js

@@ -9,3 +9,3 @@ 'use strict';

module.exports = class Topo {
exports.Sorter = class {

@@ -12,0 +12,0 @@ constructor() {

{
"name": "@hapi/topo",
"description": "Topological sorting with grouping support",
"version": "3.1.5",
"version": "4.0.0",
"repository": "git://github.com/hapijs/topo",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"keywords": [

@@ -24,3 +25,3 @@ "topological",

"scripts": {
"test": "lab -a @hapi/code -t 100 -L",
"test": "lab -a @hapi/code -t 100 -L -Y",
"test-cov-html": "lab -a @hapi/code -t 100 -L -r html -o coverage.html"

@@ -27,0 +28,0 @@ },

@@ -1,29 +0,18 @@

<a href="http://hapijs.com"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>
<a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>
# @hapi/topo
Topological sorting with grouping support.
#### Topological sorting with grouping support.
[![Build Status](https://secure.travis-ci.org/hapijs/topo.svg?branch=master)](http://travis-ci.org/hapijs/topo)
**topo** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.
## Usage
This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash).
See the [API Reference](API.md)
### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support
**Example**
```js
const Topo = require('topo');
## Useful resources
const morning = new Topo();
morning.add('Nap', { after: ['breakfast', 'prep'] });
morning.add([
'Make toast',
'Pour juice'
], { before: 'breakfast', group: 'prep' });
morning.add('Eat breakfast', { group: 'breakfast' });
morning.nodes; // ['Make toast', 'Pour juice', 'Eat breakfast', 'Nap']
```
- [Documentation and API](https://hapi.dev/family/topo/)
- [Version status](https://hapi.dev/resources/status/#topo) (builds, dependencies, node versions, licenses, eol)
- [Project policies](https://hapi.dev/policies/)
- [Free and commercial support options](https://hapi.dev/support/)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc