Skip to content

Commit 4c842ed

Browse files
committed
Renamed PIReference to PIScheme
SQUASHED: AUTO-COMMIT-src-client-reactive-polymorphic-identifiers-index.md,AUTO-COMMIT-src-client-reactive-polymorphic-identifiers-polymorphic-identifiers.js,AUTO-COMMIT-src-client-reactive-test-polymorphic-identifiers-polymorphic-identifiers.spec.js,
1 parent dae57df commit 4c842ed

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/client/reactive/polymorphic-identifiers/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Polymorphic-Identifiers
22

33
```JavaScript
4-
import { PIReference } from 'polymorphic-identifiers';
4+
import { PIScheme } from 'polymorphic-identifiers';
55

66
// example scheme
7-
class qa extends PIReference {
7+
class qa extends PIScheme {
88
read() {
99
const { elements } = this.parse();
1010
return elements;

src/client/reactive/polymorphic-identifiers/polymorphic-identifiers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
export class PIReference {
3-
static get isPIReference() { return true; }
2+
export class PIScheme {
3+
static get isPIScheme() { return true; }
44

55
applyOptions(options = {}) {
66
Object.assign(this, options);
@@ -20,7 +20,7 @@ export class PIReference {
2020
}
2121

2222
export function makeRef(referenceClass, options) {
23-
if (referenceClass && referenceClass.isPIReference) {
23+
if (referenceClass && referenceClass.isPIScheme) {
2424
const reference = new referenceClass(options);
2525
reference.applyOptions(options);
2626

src/client/reactive/test/polymorphic-identifiers/polymorphic-identifiers.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import sinon from 'src/external/sinon-3.2.1.js';
44
import sinonChai from 'src/external/sinon-chai.js';
55
chai.use(sinonChai);
66

7-
import { PIReference, makeRef } from 'src/client/reactive/polymorphic-identifiers/polymorphic-identifiers.js';
7+
import { PIScheme, makeRef } from 'src/client/reactive/polymorphic-identifiers/polymorphic-identifiers.js';
88
import { uuid } from 'utils';
99

1010
describe("PI", function() {
1111

1212
it("is defined", () => {
13-
expect(PIReference).to.be.ok;
13+
expect(PIScheme).to.be.ok;
1414
expect(makeRef).to.be.ok;
1515
});
1616

1717
it("detects accesses", () => {
18-
class fourtyTwo extends PIReference {
18+
class fourtyTwo extends PIScheme {
1919
read() {
2020
return 42;
2121
}
@@ -29,7 +29,7 @@ describe("PI", function() {
2929
});
3030

3131
it("can access the `this` reference", () => {
32-
class prop extends PIReference {
32+
class prop extends PIScheme {
3333
create(strings) {
3434
this.prop = strings.first;
3535
}
@@ -65,7 +65,7 @@ describe("PI", function() {
6565
});
6666

6767
it("can access locals with eval", () => {
68-
class local extends PIReference {
68+
class local extends PIScheme {
6969
create(strings) {
7070
this.local = strings.first;
7171
}

0 commit comments

Comments
 (0)