Skip to content

Commit 3049f7d

Browse files
😒 chore: Rename package.
1 parent 49bee8f commit 3049f7d

16 files changed

+1867
-2514
lines changed

.esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"autoPrivate": true
1414
},
1515
"brand": {
16-
"title": "@aureooms/js-knapsack"
16+
"title": "@problem-solving/knapsack"
1717
},
1818
"test": {
1919
"type": "ava",

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
:school_satchel: [@aureooms/js-knapsack](https://aureooms.github.io/js-knapsack)
1+
:school_satchel: [@problem-solving/knapsack](https://computational-problem-solving.github.io/knapsack)
22
==
33

44
Knapsack problem algorithms for JavaScript.
5-
See [docs](https://aureooms.github.io/js-knapsack/index.html).
5+
See [docs](https://computational-problem-solving.github.io/knapsack/index.html).
66

77
> :building_construction: Caveat emptor! This is work in progress. Code may be
88
> working. Documentation may be present. Coherence may be. Maybe.
99
1010
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
1111
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
1212
13-
[![License](https://img.shields.io/github/license/aureooms/js-knapsack.svg)](https://raw.githubusercontent.com/aureooms/js-knapsack/main/LICENSE)
14-
[![Version](https://img.shields.io/npm/v/@aureooms/js-knapsack.svg)](https://www.npmjs.org/package/@aureooms/js-knapsack)
15-
[![Build](https://img.shields.io/travis/aureooms/js-knapsack/main.svg)](https://travis-ci.org/aureooms/js-knapsack/branches)
16-
[![Dependencies](https://img.shields.io/david/aureooms/js-knapsack.svg)](https://david-dm.org/aureooms/js-knapsack)
17-
[![Dev dependencies](https://img.shields.io/david/dev/aureooms/js-knapsack.svg)](https://david-dm.org/aureooms/js-knapsack?type=dev)
18-
[![GitHub issues](https://img.shields.io/github/issues/aureooms/js-knapsack.svg)](https://github.com/aureooms/js-knapsack/issues)
19-
[![Downloads](https://img.shields.io/npm/dm/@aureooms/js-knapsack.svg)](https://www.npmjs.org/package/@aureooms/js-knapsack)
13+
[![License](https://img.shields.io/github/license/computational-problem-solving/knapsack.svg)](https://raw.githubusercontent.com/computational-problem-solving/knapsack/main/LICENSE)
14+
[![Version](https://img.shields.io/npm/v/@problem-solving/knapsack.svg)](https://www.npmjs.org/package/@problem-solving/knapsack)
15+
[![Build](https://img.shields.io/travis/computational-problem-solving/knapsack/main.svg)](https://travis-ci.org/computational-problem-solving/knapsack/branches)
16+
[![Dependencies](https://img.shields.io/david/computational-problem-solving/knapsack.svg)](https://david-dm.org/computational-problem-solving/knapsack)
17+
[![Dev dependencies](https://img.shields.io/david/dev/computational-problem-solving/knapsack.svg)](https://david-dm.org/computational-problem-solving/knapsack?type=dev)
18+
[![GitHub issues](https://img.shields.io/github/issues/computational-problem-solving/knapsack.svg)](https://github.com/computational-problem-solving/knapsack/issues)
19+
[![Downloads](https://img.shields.io/npm/dm/@problem-solving/knapsack.svg)](https://www.npmjs.org/package/@problem-solving/knapsack)
2020

21-
[![Code issues](https://img.shields.io/codeclimate/issues/aureooms/js-knapsack.svg)](https://codeclimate.com/github/aureooms/js-knapsack/issues)
22-
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/aureooms/js-knapsack.svg)](https://codeclimate.com/github/aureooms/js-knapsack/trends/churn)
23-
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/aureooms/js-knapsack/main.svg)](https://codecov.io/gh/aureooms/js-knapsack)
24-
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/aureooms/js-knapsack.svg)](https://codeclimate.com/github/aureooms/js-knapsack/trends/technical_debt)
25-
[![Documentation](https://aureooms.github.io/js-knapsack/badge.svg)](https://aureooms.github.io/js-knapsack/source.html)
26-
[![Package size](https://img.shields.io/bundlephobia/minzip/@aureooms/js-knapsack)](https://bundlephobia.com/result?p=@aureooms/js-knapsack)
21+
[![Code issues](https://img.shields.io/codeclimate/issues/computational-problem-solving/knapsack.svg)](https://codeclimate.com/github/computational-problem-solving/knapsack/issues)
22+
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/computational-problem-solving/knapsack.svg)](https://codeclimate.com/github/computational-problem-solving/knapsack/trends/churn)
23+
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/computational-problem-solving/knapsack/main.svg)](https://codecov.io/gh/computational-problem-solving/knapsack)
24+
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/computational-problem-solving/knapsack.svg)](https://codeclimate.com/github/computational-problem-solving/knapsack/trends/technical_debt)
25+
[![Documentation](https://computational-problem-solving.github.io/knapsack/badge.svg)](https://computational-problem-solving.github.io/knapsack/source.html)
26+
[![Package size](https://img.shields.io/bundlephobia/minzip/@problem-solving/knapsack)](https://bundlephobia.com/result?p=@problem-solving/knapsack)
2727

2828
## :book: References
2929

doc/manual/example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Examples
22

3-
> More examples in [the test files](https://github.com/aureooms/js-knapsack/tree/main/test/src).
3+
> More examples in [the test files](https://github.com/computational-problem-solving/knapsack/tree/main/test/src).

doc/manual/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ or [jspm](https://jspm.org/docs).
88

99
### yarn
1010
```terminal
11-
yarn add @aureooms/js-knapsack
11+
yarn add @problem-solving/knapsack
1212
```
1313

1414
### npm
1515
```terminal
16-
npm install @aureooms/js-knapsack --save
16+
npm install @problem-solving/knapsack --save
1717
```
1818

1919
### jspm
2020
```terminal
21-
jspm install npm:@aureooms/js-knapsack
21+
jspm install npm:@problem-solving/knapsack
2222
```

doc/manual/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'regenerator-runtime/runtime.js' ;
1212

1313
Then, import the library where needed
1414
```js
15-
const knapsack = require( '@aureooms/js-knapsack' ) ;
15+
const knapsack = require( '@problem-solving/knapsack' ) ;
1616
// or
17-
import * as knapsack from '@aureooms/js-knapsack' ;
17+
import * as knapsack from '@problem-solving/knapsack' ;
1818
```

doc/scripts/header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const domReady = function (callback) {
1010
domReady(() => {
1111
const projectname = document.createElement('a');
1212
projectname.classList.add('project-name');
13-
projectname.text = 'aureooms/js-knapsack';
13+
projectname.text = 'problem-solving/knapsack';
1414
projectname.href = './index.html';
1515

1616
const header = document.querySelectorAll('header')[0];
1717
header.insertBefore(projectname, header.firstChild);
1818

1919
const testlink = document.querySelector('header > a[data-ice="testLink"]');
20-
testlink.href = 'https://coveralls.io/github/aureooms/js-knapsack';
20+
testlink.href = 'https://coveralls.io/github/problem-solving/knapsack';
2121
testlink.target = '_BLANK';
2222

2323
const searchBox = document.querySelector('.search-box');

package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "@aureooms/js-knapsack",
2+
"name": "@problem-solving/knapsack",
33
"description": "Knapsack problem algorithms for JavaScript",
44
"version": "0.0.0",
5-
"author": "aureooms",
5+
"author": "make-github-pseudonymous-again",
66
"ava": {
77
"files": [
88
"test/src/**/*"
@@ -74,37 +74,42 @@
7474
}
7575
},
7676
"bugs": {
77-
"url": "https://github.com/aureooms/js-knapsack/issues"
77+
"url": "https://github.com/computational-problem-solving/knapsack/issues"
7878
},
7979
"dependencies": {
80-
"@aureooms/js-compare": "^1.4.8",
81-
"@aureooms/js-itertools": "^5.0.0"
80+
"@iterable-iterator/filter": "^1.0.1",
81+
"@iterable-iterator/map": "^1.0.1",
82+
"@iterable-iterator/range": "^2.1.0",
83+
"@iterable-iterator/reduce": "^1.0.1",
84+
"@iterable-iterator/sorted": "^1.0.0",
85+
"@total-order/key": "^1.0.0",
86+
"@total-order/primitive": "^1.0.1"
8287
},
8388
"devDependencies": {
84-
"@babel/cli": "7.13.10",
85-
"@babel/core": "7.13.10",
86-
"@babel/preset-env": "7.13.10",
87-
"@babel/register": "7.13.8",
88-
"ava": "3.15.0",
89+
"@babel/cli": "7.16.0",
90+
"@babel/core": "7.16.5",
91+
"@babel/preset-env": "7.16.5",
92+
"@babel/register": "7.16.5",
93+
"ava": "^3.15.0",
8994
"babel-plugin-transform-remove-console": "6.9.4",
90-
"babel-plugin-unassert": "3.0.1",
95+
"babel-plugin-unassert": "3.2.0",
9196
"babel-preset-power-assert": "3.0.0",
92-
"coveralls": "3.1.0",
97+
"coveralls": "3.1.1",
9398
"esdoc": "1.1.0",
9499
"esdoc-ecmascript-proposal-plugin": "1.0.0",
95100
"esdoc-inject-script-plugin": "1.0.0",
96101
"esdoc-inject-style-plugin": "1.0.0",
97102
"esdoc-standard-plugin": "1.0.0",
98-
"np": "7.4.0",
103+
"np": "7.6.0",
99104
"nyc": "15.1.0",
100105
"power-assert": "1.6.1",
101-
"regenerator-runtime": "0.13.7",
106+
"regenerator-runtime": "0.13.9",
102107
"xo": "0.36.1"
103108
},
104109
"files": [
105110
"lib"
106111
],
107-
"homepage": "https://aureooms.github.io/js-knapsack",
112+
"homepage": "https://computational-problem-solving.github.io/knapsack",
108113
"keywords": [
109114
"agpl",
110115
"algorithms",
@@ -131,7 +136,7 @@
131136
},
132137
"repository": {
133138
"type": "git",
134-
"url": "https://github.com/aureooms/js-knapsack"
139+
"url": "https://github.com/computational-problem-solving/knapsack"
135140
},
136141
"scripts": {
137142
"build": "babel --delete-dir-on-start --env-name production src -d lib",

src/integerValuesKnapsack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import assert from 'assert';
2-
import {sum} from '@aureooms/js-itertools';
2+
3+
import {sum} from '@iterable-iterator/reduce';
34

45
/**
56
* Exact DP solution to the 0-1 knapsack problem with integer values given a known

src/integerValuesKnapsackUnbounded.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import assert from 'assert';
2-
import {increasing} from '@aureooms/js-compare';
3-
import {max, map, range} from '@aureooms/js-itertools';
2+
import {increasing} from '@total-order/primitive';
3+
import {max} from '@iterable-iterator/reduce';
4+
import {map} from '@iterable-iterator/map';
5+
import {range} from '@iterable-iterator/range';
46

57
/**
68
* Exact DP solution to the unbounded knapsack problem with integer values

src/knapsackApprox.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import assert from 'assert';
2-
import {increasing} from '@aureooms/js-compare';
3-
import {max, map, filter, range} from '@aureooms/js-itertools';
2+
import {increasing} from '@total-order/primitive';
3+
import {max} from '@iterable-iterator/reduce';
4+
import {map} from '@iterable-iterator/map';
5+
import {filter} from '@iterable-iterator/filter';
6+
import {range} from '@iterable-iterator/range';
47

58
import integerValuesKnapsack from './integerValuesKnapsack';
69

src/knapsackGreedy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import assert from 'assert';
2-
import {map, range, sorted, filter} from '@aureooms/js-itertools';
2+
import {map} from '@iterable-iterator/map';
3+
import {range} from '@iterable-iterator/range';
4+
import {sorted} from '@iterable-iterator/sorted';
5+
import {filter} from '@iterable-iterator/filter';
36

47
import Item from './Item';
58
import orderedByDecreasingUtility from './orderedByDecreasingUtility';

src/knapsackUnboundedGreedy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import assert from 'assert';
2-
import {map, range, sorted} from '@aureooms/js-itertools';
2+
import {map} from '@iterable-iterator/map';
3+
import {range} from '@iterable-iterator/range';
4+
import {sorted} from '@iterable-iterator/sorted';
35

46
import Item from './Item';
57
import orderedByDecreasingUtility from './orderedByDecreasingUtility';

src/orderedByDecreasingUtility.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import {fn, decreasing} from '@aureooms/js-compare';
1+
import {decreasing} from '@total-order/primitive';
2+
import {key} from '@total-order/key';
23

34
const utility = (x) => x.v / x.w;
4-
const orderedByDecreasingUtility = fn(decreasing, utility);
5+
const orderedByDecreasingUtility = key(decreasing, utility);
56

67
export default orderedByDecreasingUtility;

test/src/0-1-knapsack-problem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import test from 'ava';
22

3-
import {all, map} from '@aureooms/js-itertools';
3+
import {all} from '@iterable-iterator/reduce';
4+
import {map} from '@iterable-iterator/map';
45

56
import {
67
integerValuesKnapsack,

test/src/unbounded-knapsack-problem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import test from 'ava';
22

3-
import {all, map} from '@aureooms/js-itertools';
3+
import {all} from '@iterable-iterator/reduce';
4+
import {map} from '@iterable-iterator/map';
45

56
import {
67
integerValuesKnapsackUnbounded,

0 commit comments

Comments
 (0)