File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
# jsonld-signatures ChangeLog
2
2
3
+ ## 9.1.1 - 2021-06-xx
4
+
5
+ ### Fixed
6
+ - Use ` Map ` to internally represent contexts instead of an object. This
7
+ optimizes better w/ v8.
8
+
3
9
## 9.1.0 - 2021-06-29
4
10
5
11
### Changed
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2017-2018 Digital Bazaar, Inc. All rights reserved.
2
+ * Copyright (c) 2017-2021 Digital Bazaar, Inc. All rights reserved.
3
3
*/
4
4
'use strict' ;
5
5
6
6
const constants = require ( './constants' ) ;
7
7
const { contexts : securityContexts } = require ( 'security-context' ) ;
8
8
9
- module . exports = {
10
- [ constants . SECURITY_CONTEXT_V1_URL ] :
11
- securityContexts . get ( constants . SECURITY_CONTEXT_V1_URL ) ,
12
- [ constants . SECURITY_CONTEXT_V2_URL ] :
13
- securityContexts . get ( constants . SECURITY_CONTEXT_V2_URL )
14
- } ;
9
+ module . exports = new Map ( [
10
+ [ constants . SECURITY_CONTEXT_V1_URL ,
11
+ securityContexts . get ( constants . SECURITY_CONTEXT_V1_URL ) ] ,
12
+ [ constants . SECURITY_CONTEXT_V2_URL ,
13
+ securityContexts . get ( constants . SECURITY_CONTEXT_V2_URL ) ]
14
+ ] ) ;
Original file line number Diff line number Diff line change 1
1
/*!
2
- * Copyright (c) 2018 Digital Bazaar, Inc. All rights reserved.
2
+ * Copyright (c) 2018-2021 Digital Bazaar, Inc. All rights reserved.
3
3
*/
4
4
'use strict' ;
5
5
@@ -36,7 +36,7 @@ api.extendContextLoader = documentLoader => {
36
36
* url then fetches a jsonld document.
37
37
*/
38
38
return async url => {
39
- const context = contexts [ url ] ;
39
+ const context = contexts . get ( url ) ;
40
40
if ( context !== undefined ) {
41
41
return {
42
42
contextUrl : null ,
You can’t perform that action at this time.
0 commit comments