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

@web3-storage/did-mailto

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-storage/did-mailto - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

dist/src/index.js

20

dist/src/index.d.ts
/**
* create a did:mailto from an email address
*
* @param {import("./types").EmailAddress} email
* @returns {import("./types").DidMailto}
* @param {import("./types.js").EmailAddress} email
* @returns {import("./types.js").DidMailto}
*/
export function fromEmail(email: import("./types").EmailAddress): import("./types").DidMailto;
export function fromEmail(email: import("./types.js").EmailAddress): import("./types.js").DidMailto;
/**
* @param {import("./types").DidMailto} did
* @returns {import("./types").EmailAddress}
* @param {import("./types.js").DidMailto} did
* @returns {import("./types.js").EmailAddress}
*/
export function toEmail(did: import("./types").DidMailto): import("./types").EmailAddress;
export function toEmail(did: import("./types.js").DidMailto): import("./types.js").EmailAddress;
/**

@@ -19,5 +19,5 @@ * given a string, if it is an EmailAddress, return it, otherwise throw an error.

* @param {string} input
* @returns {import("./types").EmailAddress}
* @returns {import("./types.js").EmailAddress}
*/
export function email(input: string): import("./types").EmailAddress;
export function email(input: string): import("./types.js").EmailAddress;
/**

@@ -27,5 +27,5 @@ * parse a did mailto from a string

* @param {string} input
* @returns {import("./types").DidMailto}
* @returns {import("./types.js").DidMailto}
*/
export function fromString(input: string): import("./types").DidMailto;
export function fromString(input: string): import("./types.js").DidMailto;
//# sourceMappingURL=index.d.ts.map
{
"name": "@web3-storage/did-mailto",
"version": "2.0.1",
"version": "2.0.2",
"description": "did:mailto",

@@ -17,9 +17,13 @@ "repository": {

"test",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map"
"dist"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./src/index.js"
".": "./dist/src/index.js",
"./types": "./dist/src/types.js"
},
"typesVersions": {
"*": {
"types": [
"dist/src/types"
]
}

@@ -29,3 +33,3 @@ },

"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/node": "^20.8.4",
"hd-scripts": "^4.1.0",

@@ -63,2 +67,3 @@ "mocha": "^10.2.0"

"scripts": {
"attw": "attw --pack .",
"build": "tsc --build",

@@ -65,0 +70,0 @@ "check": "tsc --build",

/**
* create a did:mailto from an email address
*
* @param {import("./types").EmailAddress} email
* @returns {import("./types").DidMailto}
* @param {import("./types.js").EmailAddress} email
* @returns {import("./types.js").DidMailto}
*/

@@ -16,4 +16,4 @@ export function fromEmail(email) {

/**
* @param {import("./types").DidMailto} did
* @returns {import("./types").EmailAddress}
* @param {import("./types.js").DidMailto} did
* @returns {import("./types.js").EmailAddress}
*/

@@ -34,7 +34,7 @@ export function toEmail(did) {

* @param {string} input
* @returns {import("./types").EmailAddress}
* @returns {import("./types.js").EmailAddress}
*/
export function email(input) {
const { domain, local } = parseEmail(input)
/** @type {import("./types").EmailAddress} */
/** @type {import("./types.js").EmailAddress} */
const emailAddress = `${local}@${domain}`

@@ -48,3 +48,3 @@ return emailAddress

* @param {string} input
* @returns {import("./types").DidMailto}
* @returns {import("./types.js").DidMailto}
*/

@@ -51,0 +51,0 @@ export function fromString(input) {

@@ -10,3 +10,3 @@ import * as assert from 'assert'

* @param {typeof didMailto} didMailto
* @param {import("./test-types").TestAdder} test
* @param {import("./test-types.js").TestAdder} test
*/

@@ -13,0 +13,0 @@ function testDidMailto(didMailto, test) {

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