Skip to content

Commit 4db96cb

Browse files
readme + spm
1 parent f944992 commit 4db96cb

File tree

2 files changed

+89
-2
lines changed

2 files changed

+89
-2
lines changed

README.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#[js-splitting](http://aureooms.github.io/js-splitting)
22

3-
Array manipulation code bricks for JavaScript.
3+
Splitting code bricks for JavaScript.
4+
5+
```js
6+
let pivot = splitting.hoare( predicate , array , left , right ) ;
7+
8+
for ( let k of itertools.range( left , pivot , 1 ) ) predicate( array[k] ) ; // 0
9+
for ( let k of itertools.range( pivot , right , 1 ) ) predicate( array[k] ) ; // 1
10+
```
411

512
[![NPM license](http://img.shields.io/npm/l/aureooms-js-splitting.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-splitting/master/LICENSE)
613
[![NPM version](http://img.shields.io/npm/v/aureooms-js-splitting.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-splitting)
@@ -15,4 +22,81 @@ Array manipulation code bricks for JavaScript.
1522
[![Inline docs](http://inch-ci.org/github/aureooms/js-splitting.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-splitting)
1623

1724

18-
***( forked from [js-array](https://github.com/aureooms/js-array) )***
25+
Can be managed through [jspm](https://github.com/jspm/jspm-cli),
26+
[duo](https://github.com/duojs/duo),
27+
[component](https://github.com/componentjs/component),
28+
[bower](https://github.com/bower/bower),
29+
[ender](https://github.com/ender-js/Ender),
30+
[jam](https://github.com/caolan/jam),
31+
[spm](https://github.com/spmjs/spm),
32+
and [npm](https://github.com/npm/npm).
33+
34+
## Install
35+
36+
### jspm
37+
```terminal
38+
jspm install github:aureooms/js-splitting
39+
# or
40+
jspm install npm:aureooms-js-splitting
41+
```
42+
### duo
43+
No install step needed for duo!
44+
45+
### component
46+
```terminal
47+
component install aureooms/js-splitting
48+
```
49+
50+
### bower
51+
```terminal
52+
bower install aureooms-js-splitting
53+
```
54+
55+
### ender
56+
```terminal
57+
ender add aureooms-js-splitting
58+
```
59+
60+
### jam
61+
```terminal
62+
jam install aureooms-js-splitting
63+
```
64+
65+
### spm
66+
```terminal
67+
spm install aureooms-js-splitting --save
68+
```
69+
70+
### npm
71+
```terminal
72+
npm install aureooms-js-splitting --save
73+
```
74+
75+
## Require
76+
### jspm
77+
```js
78+
let splitting = require( "github:aureooms/js-splitting" ) ;
79+
// or
80+
import splitting from 'aureooms-js-splitting' ;
81+
```
82+
### duo
83+
```js
84+
let splitting = require( "aureooms/js-splitting" ) ;
85+
```
86+
87+
### component, ender, spm, npm
88+
```js
89+
let splitting = require( "aureooms-js-splitting" ) ;
90+
```
91+
92+
### bower
93+
The script tag exposes the global variable `splitting`.
94+
```html
95+
<script src="bower_components/aureooms-js-splitting/js/dist/splitting.min.js"></script>
96+
```
97+
Alternatively, you can use any tool mentioned [here](http://bower.io/docs/tools/).
98+
99+
### jam
100+
```js
101+
require( [ "aureooms-js-splitting" ] , function ( splitting ) { ... } ) ;
102+
```

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/aureooms/js-splitting.git"
34+
},
35+
"spm": {
36+
"main": "js/dist/splitting.js"
3437
}
3538
}

0 commit comments

Comments
 (0)