New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

doi-utils

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doi-utils - npm Package Compare versions

Comparing version 1.0.9 to 2.0.0

dist/index.js

15

dist/index.d.ts

@@ -1,4 +0,4 @@

import { validatePart } from './validatePart';
export { DEFAULT_RESOLVERS, STRICT_RESOLVERS } from './resolvers';
export declare type Options = {
import { validatePart } from './validatePart.js';
export { DEFAULT_RESOLVERS, STRICT_RESOLVERS } from './resolvers.js';
export type Options = {
strict?: boolean;

@@ -14,3 +14,3 @@ };

*/
declare function validate(possibleDOI?: string, opts?: Options): boolean;
export declare function validate(possibleDOI?: string | null, opts?: Options): boolean;
/**

@@ -22,3 +22,3 @@ * Normalize an input string to the component of the DOI

*/
declare function normalize(possibleDOI: string, opts?: Options): string | undefined;
export declare function normalize(possibleDOI?: string | null, opts?: Options): string | undefined;
/**

@@ -30,4 +30,4 @@ * Builds a canonical URL pointing to https://doi.org

*/
declare function buildUrl(possibleDOI: string, opts?: Options): string | undefined;
declare const _default: {
export declare function buildUrl(possibleDOI?: string | null, opts?: Options): string | undefined;
export declare const doi: {
validatePart: typeof validatePart;

@@ -38,2 +38,1 @@ validate: typeof validate;

};
export default _default;

@@ -1,5 +0,4 @@

/// <reference types="node" />
interface Resolver {
test: (url: URL) => boolean;
parse: (url: URL) => string;
parse: (url: URL) => string | undefined;
}

@@ -6,0 +5,0 @@ export declare const STRICT_RESOLVERS: Resolver[];

@@ -9,2 +9,2 @@ /**

*/
export declare function validatePart(possibleDOI?: string): boolean;
export declare function validatePart(possibleDOI?: string | null): boolean;
{
"name": "doi-utils",
"version": "1.0.9",
"version": "2.0.0",
"description": "Set of utility functions to help with handling DOI(Digital Object Identifier)",
"author": "Curvenote Inc. <support@curvenote.com>",
"license": "MIT",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
"types": "dist/index.d.ts",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"repository": {

@@ -21,9 +24,9 @@ "type": "git",

"prepublishOnly": "npm test && npm run build",
"build_types": "tsc -b .",
"build_cjs": "swc -C module.type=commonjs -d dist/cjs src/",
"build_esm": "swc -C module.type=es6 -d dist/esm src/",
"clean": "rm -rf dist",
"build": "npm run clean && npm run build_types && npm run build_esm && npm run build_cjs",
"test": "jest",
"test:watch": "jest --watch"
"test": "vitest run",
"test:watch": "vitest watch",
"lint": "eslint \"src/**/*.ts*\" -c ./.eslintrc.cjs",
"lint:format": "prettier --check \"src/**/*.{ts,tsx,md}\"",
"build:esm": "tsc --project ./tsconfig.json --module es2015 --outDir dist --declaration",
"build": "npm-run-all -l clean -p build:esm"
},

@@ -35,9 +38,9 @@ "keywords": [

"devDependencies": {
"@swc/cli": "^0.1.57",
"@swc/core": "^1.2.186",
"@swc/jest": "^0.2.21",
"@types/jest": "^27.5.1",
"jest": "^27.1.0",
"typescript": "^4.6.4"
"eslint": "^8.42.0",
"eslint-config-curvenote": "latest",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vitest": "^0.32.0"
}
}
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