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

@autoplay/utils

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@autoplay/utils - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

16

dist/internal/DevString.js

@@ -49,12 +49,18 @@ import { devStringify } from "./devStringify";

const stringSubs = this._subs.map((sub) => devStringify(sub, true));
return typeof this._templateOrID === "number"
let display = typeof this._templateOrID === "number"
? `#${this._templateOrID}: ${stringSubs.join("; ")}` // if dev calls are replaced with message identifiers (this is speculative)
: String.raw(this._templateOrID, stringSubs);
if (this._values) {
if (this._values.cause) {
display += "\n because: " + devStringify(this._values.cause);
}
if (this._values.records) {
display += "\n records: " + devStringify(this._values.records);
}
}
return display;
}
// Notice that `"" + {toString() { return 1}} === "1"`
toString() {
const stringSubs = this._subs.map((sub) => devStringify(sub));
return typeof this._templateOrID === "number"
? `#${this._templateOrID}: ${stringSubs.join("; ")}` // if dev calls are replaced with message identifiers (this is speculative)
: String.raw(this._templateOrID, stringSubs);
return this.toDisplay();
}

@@ -61,0 +67,0 @@ toJSON(key) {

{
"name": "@autoplay/utils",
"version": "0.0.7",
"version": "0.0.8",
"description": "Utilities designed for error management, parsing, and TypeScript domain modeling.",

@@ -13,3 +13,4 @@ "keywords": [],

"test": "jest",
"prepare": "npm run clean && npm run build"
"prepare": "npm run clean && npm run build",
"prepack": "npm run prepare"
},

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

@@ -18,3 +18,5 @@ import { devStringify } from "./devStringify";

public readonly _subs: any[],
public _values: undefined | { cause?: DevString | DevString[] | undefined; records?: Record<string, unknown> } = undefined,
public _values:
| undefined
| { cause?: DevString | DevString[] | undefined; records?: Record<string, unknown> } = undefined,
) {}

@@ -57,5 +59,15 @@

const stringSubs = this._subs.map((sub) => devStringify(sub, true));
return typeof this._templateOrID === "number"
? `#${this._templateOrID}: ${stringSubs.join("; ")}` // if dev calls are replaced with message identifiers (this is speculative)
: String.raw(this._templateOrID as TemplateStringsArray, stringSubs);
let display =
typeof this._templateOrID === "number"
? `#${this._templateOrID}: ${stringSubs.join("; ")}` // if dev calls are replaced with message identifiers (this is speculative)
: String.raw(this._templateOrID as TemplateStringsArray, stringSubs);
if (this._values) {
if (this._values.cause) {
display += "\n because: " + devStringify(this._values.cause);
}
if (this._values.records) {
display += "\n records: " + devStringify(this._values.records);
}
}
return display;
}

@@ -65,6 +77,3 @@

toString() {
const stringSubs = this._subs.map((sub) => devStringify(sub));
return typeof this._templateOrID === "number"
? `#${this._templateOrID}: ${stringSubs.join("; ")}` // if dev calls are replaced with message identifiers (this is speculative)
: String.raw(this._templateOrID as TemplateStringsArray, stringSubs);
return this.toDisplay();
}

@@ -71,0 +80,0 @@

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