Skip to content

Commit 0600062

Browse files
authored
Merge pull request #3 from typescript-package/develop
v1.0.0
2 parents 4266b34 + 2a35bf8 commit 0600062

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,26 @@ npm install @typescript-package/affix --save-peer
3838

3939
```typescript
4040
import {
41+
// Abstract.
4142
Affix,
43+
// Class.
4244
Prefix,
4345
Suffix
4446
} from '@typescript-package/affix';
4547
```
4648

49+
### `Affix`
50+
51+
A class to manage affixes (prefixes or suffixes) that can be applied to strings.
52+
53+
### `Prefix`
54+
55+
A class to manage prefixes that can be applied to strings.
56+
57+
### `Suffix`
58+
59+
A class to manage suffixes that can be applied to strings.
60+
4761
## Contributing
4862

4963
Your contributions are valued! If you'd like to contribute, please feel free to submit a pull request. Help is always appreciated.

src/test/prefix.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Prefix } from '../lib/prefix.class';
2+
3+
const prefix = new Prefix();
4+
5+
console.group(`Prefix`);
6+
7+
console.debug(`set('_')`, prefix.set('_'));
8+
console.debug(`get()`, prefix.get());
9+
console.debug(`value`, prefix.value);
10+
11+
console.groupEnd();
12+
13+
describe(Prefix.name, () => {
14+
let namePrefix: Prefix;
15+
16+
beforeEach(() => namePrefix = new Prefix());
17+
18+
it('is DEFINED', () => expect(namePrefix).toBeDefined());
19+
it('initially set prefix to $$', () => expect(new Prefix('$$').value).toEqual('$$'));
20+
it('set prefix to $$', () => expect(namePrefix.set('$$').value).toEqual('$$'));
21+
});

0 commit comments

Comments
 (0)