Skip to content

Commit 0cbe27d

Browse files
author
Steve Thompson
committed
Updated dependencies.
Made small changes to README
1 parent 609e965 commit 0cbe27d

File tree

5 files changed

+511
-516
lines changed

5 files changed

+511
-516
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
# IDEs and editors
1212
/.idea
13-
.idea
1413
.project
1514
.classpath
1615
.c9/

README.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,9 @@ To actually see or get the array itself, you must access PublicArray's `.data` p
1717

1818
`console.log(arr.data); // logs '[10,11,2,3,4,100,200,300]' `
1919

20-
## Installation
21-
22-
You must have npm installed first. Then, in the command line:
23-
24-
```bash
25-
npm install @writetome51/public-array
26-
```
27-
28-
## Loading
29-
```
30-
// If using TypeScript:
31-
import { PublicArray } from '@writetome51/public-array';
32-
// If using ES5 JavaScript:
33-
var PublicArray = require('@writetome51/public-array').PublicArray;
34-
```
35-
36-
37-
## Instantiation
20+
## Constructor
3821
```
39-
new PublicArray(array = [])
40-
// Examples:
41-
// let arr = new PublicArray([1,2,3,4,5]);
42-
// Or, instantiate with an empty array:
43-
// let arr = new PublicArray();
22+
constructor(data? = []) // 'data' becomes the array the class manipulates.
4423
```
4524

4625
## Properties
@@ -525,9 +504,9 @@ startsWith(values: any[]): boolean
525504
endsWith(values: any[]): boolean
526505
// returns true if this.data ends with exact sequence of values.
527506
528-
matches(array): boolean
529-
// returns true if this.data matches passed array exactly.
530-
// will return false if this.data or passed array contains object.
507+
matches(values: any[]): boolean
508+
// returns true if this.data matches values exactly.
509+
// will return false if values contains object.
531510
532511
// For the next 3 methods:
533512
// testFunction is a callback with same signature as callback passed to
@@ -570,7 +549,10 @@ forEach(iterationFunction): void
570549
set(newArray): void
571550
// Changes value of this.data to newArray without breaking its memory reference.
572551
// So if there are copies of this.data, the copies will be updated as well.
573-
552+
```
553+
The methods below are not important to know about in order to use this
554+
class. They're inherited from [BaseClass](https://github.com/writetome51/typescript-base-class#baseclass) .
555+
```
574556
protected _createGetterAndOrSetterForEach(
575557
propertyNames: string[],
576558
configuration: IGetterSetterConfiguration
@@ -671,7 +653,21 @@ replace.adjacentAt(2, ['just', 'an', 'example']);
671653

672654
PublicArray<--[PublicArrayContent](https://github.com/writetome51/public-array-content#publicarraycontent)<--[PublicArrayContainer](https://github.com/writetome51/public-array-container#publicarraycontainer)<--[BaseClass](https://github.com/writetome51/typescript-base-class#baseclass)
673655

656+
## Installation
657+
658+
You must have npm installed first. Then, in the command line:
659+
660+
```bash
661+
npm install @writetome51/public-array
662+
```
674663

664+
## Loading
665+
```
666+
// If using TypeScript:
667+
import { PublicArray } from '@writetome51/public-array';
668+
// If using ES5 JavaScript:
669+
var PublicArray = require('@writetome51/public-array').PublicArray;
670+
```
675671

676672
## License
677673
[MIT](https://choosealicense.com/licenses/mit/)

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var __extends = (this && this.__extends) || (function () {
55
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
66
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
77
return extendStatics(d, b);
8-
}
8+
};
99
return function (d, b) {
1010
extendStatics(d, b);
1111
function __() { this.constructor = d; }

0 commit comments

Comments
 (0)