Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

did-resolver

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

did-resolver - npm Package Compare versions

Comparing version 0.0.6-alpha1 to 0.0.6-alpha2

20

lib/resolver.js

@@ -38,3 +38,21 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var REGISTRY = {};
var globalObject;
var REGISTRY;
if (window) {
globalObject = window;
}
else if (typeof global === 'object') {
globalObject = global;
}
else {
globalObject = {
DID_REGISTRY: {}
};
}
if (globalObject.DID_REGISTRY) {
REGISTRY = globalObject.DID_REGISTRY;
}
else {
REGISTRY = globalObject.DID_REGISTRY = {};
}
function registerMethod(method, resolver) {

@@ -41,0 +59,0 @@ REGISTRY[method] = resolver;

3

package.json
{
"name": "did-resolver",
"version": "0.0.6-alpha1",
"version": "0.0.6-alpha2",
"description": "Resolve DID documents",

@@ -26,2 +26,3 @@ "main": "lib/resolver.js",

"@types/jest": "^23.3.10",
"@types/node": "^10.12.18",
"jest": "^23.6.0",

@@ -28,0 +29,0 @@ "prettier": "^1.15.3",

@@ -36,5 +36,24 @@ export interface DIDDocument {

}
let globalObject : {
DID_REGISTRY: ResolverRegistry
}
const REGISTRY : ResolverRegistry = {}
var REGISTRY : ResolverRegistry
if (window) {
globalObject = window
} else if (typeof global === 'object') {
globalObject = global
} else {
globalObject = {
DID_REGISTRY: {}
}
}
if (globalObject.DID_REGISTRY) {
REGISTRY = globalObject.DID_REGISTRY
} else {
REGISTRY = globalObject.DID_REGISTRY = {}
}
export function registerMethod (method: string, resolver: DIDResolver) {

@@ -41,0 +60,0 @@ REGISTRY[method] = resolver

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc