Skip to content

Commit b4e5c1d

Browse files
keep deque only
1 parent 2ecd779 commit b4e5c1d

File tree

145 files changed

+129
-7638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+129
-7638
lines changed

README.md

Lines changed: 13 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,20 @@
1-
[js-collections](http://aureooms.github.io/js-collections)
1+
[js-collections-deque](http://aureooms.github.io/js-collections-deque)
22
==
33

4-
Collections library for JavaScript. Parent is
4+
Python's deque data structure for JavaScript. Parent is
55
[js-data-structures](https://github.com/aureooms/js-data-structures).
66

7-
JavaScript version of
8-
[Python's collections library](https://docs.python.org/3.6/library/collections.html)
9-
together with
10-
[Python's heapq library](https://docs.python.org/3.6/library/heapq.html)
11-
and
12-
[Python's bisect library](https://docs.python.org/3.6/library/bisect.html).
13-
14-
```js
15-
let {
16-
heapq , bisect ,
17-
namedtuple ,
18-
deque ,
19-
set ,
20-
dict , defaultdict , ordereddict , counter , chainmap
21-
} = collections ;
22-
```
23-
24-
[![NPM license](http://img.shields.io/npm/l/aureooms-js-collections.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-collections/master/LICENSE)
25-
[![NPM version](http://img.shields.io/npm/v/aureooms-js-collections.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-collections)
26-
[![Build Status](http://img.shields.io/travis/aureooms/js-collections.svg?style=flat)](https://travis-ci.org/aureooms/js-collections)
27-
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-collections.svg?style=flat)](https://coveralls.io/r/aureooms/js-collections)
28-
[![Dependencies Status](http://img.shields.io/david/aureooms/js-collections.svg?style=flat)](https://david-dm.org/aureooms/js-collections#info=dependencies)
29-
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-collections.svg?style=flat)](https://david-dm.org/aureooms/js-collections#info=devDependencies)
30-
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-collections.svg?style=flat)](https://codeclimate.com/github/aureooms/js-collections)
31-
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-collections.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-collections)
32-
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-collections.svg?style=flat)](https://github.com/aureooms/js-collections/issues)
33-
[![Documentation](https://aureooms.github.io/js-collections/badge.svg)](https://aureooms.github.io/js-collections/source.html)
34-
35-
### Some changes w.r.t. Python's API
36-
37-
#### `heapq`
38-
397
```js
40-
let array = [ 2 , 1 , 3 ] ;
41-
let heap = heapq.heapify( compare.increasing , array ) ;
42-
array[0] ; // 1
43-
heapq.heappop( heap ) ; // 1
44-
heapq.heappop( heap ) ; // 2
45-
heapq.heappop( heap ) ; // 3
46-
array.length ; // 0
8+
deque( 'abcde' , 3 ) ; // 'cde'
479
```
48-
#### `set`
4910

50-
##### `set( iterable = null ) -> this`
51-
##### `set.inclusion( A , B ) -> {-1,0,1}`
52-
##### `set.prototype[Symbol.iterator]( ) -> iterable`
53-
##### `set.prototype.keys( ) -> iterable`
54-
##### `set.prototype.len( ) -> integer`
55-
##### `set.prototype.has( key ) -> boolean`
56-
##### `set.prototype.isdisjoint( other ) -> boolean`
57-
##### `set.prototype.isequal( other ) -> boolean`
58-
##### `set.prototype.issubset( other ) -> boolean`
59-
##### `set.prototype.ispropersubset( other ) -> boolean`
60-
##### `set.prototype.issuperset( other ) -> boolean`
61-
##### `set.prototype.ispropersuperset( other ) -> boolean`
62-
##### `set.prototype.union( ...others ) -> set`
63-
##### `set.prototype.intersection( ...others ) -> set`
64-
##### `set.prototype.difference( ...others ) -> set`
65-
##### `set.prototype.symmetric_difference( other ) -> set`
66-
##### `set.prototype.copy( ) -> set`
67-
##### `set.prototype.update( ...others ) -> this`
68-
##### `set.prototype.intersection_update( ...others ) -> this`
69-
##### `set.prototype.difference_update( ...others ) -> this`
70-
##### `set.prototype.symmetric_difference_update( other ) -> this`
71-
##### `set.prototype.add( key ) -> this`
72-
##### `set.prototype.remove( key ) -> this`
73-
##### `set.prototype.discard( key ) -> this`
74-
##### `set.prototype.pop( ) -> key`
75-
##### `set.prototype.clear( ) -> this`
11+
[![NPM license](http://img.shields.io/npm/l/aureooms-js-collections-deque.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-collections-deque/master/LICENSE)
12+
[![NPM version](http://img.shields.io/npm/v/aureooms-js-collections-deque.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-collections-deque)
13+
[![Build Status](http://img.shields.io/travis/aureooms/js-collections-deque.svg?style=flat)](https://travis-ci.org/aureooms/js-collections-deque)
14+
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-collections-deque.svg?style=flat)](https://coveralls.io/r/aureooms/js-collections-deque)
15+
[![Dependencies Status](http://img.shields.io/david/aureooms/js-collections-deque.svg?style=flat)](https://david-dm.org/aureooms/js-collections-deque#info=dependencies)
16+
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-collections-deque.svg?style=flat)](https://david-dm.org/aureooms/js-collections-deque#info=devDependencies)
17+
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-collections-deque.svg?style=flat)](https://codeclimate.com/github/aureooms/js-collections-deque)
18+
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-collections-deque.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-collections-deque)
19+
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-collections-deque.svg?style=flat)](https://github.com/aureooms/js-collections-deque/issues)
20+
[![Documentation](https://aureooms.github.io/js-collections-deque/badge.svg)](https://aureooms.github.io/js-collections-deque/source.html)

doc/manual/example.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
See Python's docs:
22

3-
- [collections](https://docs.python.org/3.6/library/collections.html)
4-
- [heapq](https://docs.python.org/3.6/library/heapq.html)
5-
- [bisect](https://docs.python.org/3.6/library/bisect.html)
3+
- [collections](https://docs.python.org/3.6/library/collections.html#collections.deque)

doc/manual/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ or [npm](https://github.com/npm/npm).
44

55
### jspm
66
```terminal
7-
jspm install npm:aureooms-js-collections
7+
jspm install npm:aureooms-js-collections-deque
88
```
99

1010
### npm
1111
```terminal
12-
npm install aureooms-js-collections --save
12+
npm install aureooms-js-collections-deque --save
1313
```

doc/manual/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'babel-polyfill' ;
88

99
Then
1010
```js
11-
const number = require( 'aureooms-js-collections' ) ;
11+
const number = require( 'aureooms-js-collections-deque' ) ;
1212
// or
13-
import number from 'aureooms-js-collections' ;
13+
import number from 'aureooms-js-collections-deque' ;
1414
```

doc/scripts/header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ domReady(function(){
1313

1414
var projectname = document.createElement('a');
1515
projectname.classList.add('project-name');
16-
projectname.text = 'aureooms/js-collections';
16+
projectname.text = 'aureooms/js-collections-deque';
1717
projectname.href = './index.html' ;
1818

1919
var header = document.getElementsByTagName('header')[0] ;
2020
header.insertBefore(projectname,header.firstChild);
2121

2222
var testlink = document.querySelector('header > a[data-ice="testLink"]') ;
23-
testlink.href = 'https://coveralls.io/github/aureooms/js-collections' ;
23+
testlink.href = 'https://coveralls.io/github/aureooms/js-collections-deque' ;
2424
testlink.target = '_BLANK' ;
2525

2626
var searchBox = document.querySelector('.search-box');

esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"debug": false,
1010
"index": "./README.md",
1111
"package": "./package.json",
12-
"title": "aureooms/js-collections",
12+
"title": "aureooms/js-collections-deque",
1313
"test": {
1414
"type": "ava",
1515
"source": "./test/src"

lib/bisect/bisect_left.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

lib/bisect/bisect_right.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

lib/bisect/index.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

lib/bisect/insort_left.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)