File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,26 @@ npm install @typescript-package/affix --save-peer
38
38
39
39
``` typescript
40
40
import {
41
+ // Abstract.
41
42
Affix ,
43
+ // Class.
42
44
Prefix ,
43
45
Suffix
44
46
} from ' @typescript-package/affix' ;
45
47
```
46
48
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
+
47
61
## Contributing
48
62
49
63
Your contributions are valued! If you'd like to contribute, please feel free to submit a pull request. Help is always appreciated.
Original file line number Diff line number Diff line change
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments