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

@dhau/lang

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhau/lang - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

dist/index.mjs

1

dist/index.d.ts
export * from "./error/caught-result";
export * from "./array/find";
export * from "./number/format";

46

dist/index.js

@@ -1,29 +0,19 @@

function isError(error) {
// TODO: Must be a better check
return typeof error === "object" && !!error;
}
function caughtResultToError(error) {
if (isError(error)) {
return error;
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
return new Error(caughtResultToString(error));
}
function caughtResultToString(error) {
if (isError(error)) {
return error.message;
}
if (typeof error === "string") {
return error;
}
return String(error);
}
function findOnly(array, predicate, message) {
const found = array.filter(predicate);
if (found.length !== 1) {
throw new Error(message !== null && message !== void 0 ? message : `Expected exactly one item, found ${found.length}`);
}
return found[0];
}
export { caughtResultToError, caughtResultToString, findOnly };
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./error/caught-result"), exports);
__exportStar(require("./array/find"), exports);
__exportStar(require("./number/format"), exports);
{
"name": "@dhau/lang",
"version": "0.0.7",
"version": "0.0.8",
"type": "module",
"description": "Various language extensions for JS",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.mjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},

@@ -15,0 +17,0 @@ "files": [

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