Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Merge 5de6aa8 into 6dda822
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed May 12, 2021
2 parents 6dda822 + 5de6aa8 commit acdb9b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import { Context } from './types';

/** Get a key to uniquely identify a context value */
export function createContextKey(description: string) {
// The specification states that for the same input, multiple calls should
// return different keys. Due to the nature of the JS dependency management
// system, this creates problems where multiple versions of some package
// could hold different keys for the same property.
//
// Therefore, we use Symbol.for which returns the same key for the same input.
return Symbol.for(description);
}

Expand Down

0 comments on commit acdb9b4

Please sign in to comment.