File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 20
20
},
21
21
"license" : " BSD-3-Clause" ,
22
22
"dependencies" : {
23
- "es6-map" : " ^0.1.3" ,
24
23
"hoist-non-react-statics" : " ^1.0.5" ,
25
24
"lodash" : " ^4.6.1" ,
26
25
"object-unfreeze" : " ^1.0.2"
35
34
"react-dom" : " ^15.0.0-rc.1"
36
35
},
37
36
"scripts" : {
38
- "pragmatist" : " node ./node_modules/.bin/ pragmatist --es5" ,
37
+ "pragmatist" : " pragmatist --es5" ,
39
38
"lint" : " npm run pragmatist lint" ,
40
39
"test" : " npm run pragmatist test --type-annotations" ,
41
40
"build" : " npm run pragmatist build" ,
Original file line number Diff line number Diff line change 1
- import Map from 'es6 -map' ;
1
+ import Map from './simple -map' ;
2
2
3
3
const stylesIndex = new Map ( ) ;
4
4
Original file line number Diff line number Diff line change 1
1
import _ from 'lodash' ;
2
- import Map from 'es6 -map' ;
2
+ import Map from './simple -map' ;
3
3
4
4
const userConfigurationIndex = new Map ( ) ;
5
5
Original file line number Diff line number Diff line change
1
+ export default class SimpleMap {
2
+ constructor ( ) {
3
+ this . keys = [ ] ;
4
+ this . values = [ ] ;
5
+ }
6
+
7
+ get ( key ) {
8
+ const index = this . keys . indexOf ( key ) ;
9
+ if ( index === - 1 ) {
10
+ return ;
11
+ }
12
+ return this . values [ index ] ;
13
+ }
14
+
15
+ set ( key , value ) {
16
+ this . keys . push ( key ) ;
17
+ this . values . push ( value ) ;
18
+ return value ;
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments