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

figma-api-stub

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-api-stub - npm Package Compare versions

Comparing version 0.0.46 to 0.0.47

36

dist/stubs.js

@@ -356,2 +356,38 @@ "use strict";

};
TextNodeStub.prototype.deleteCharacters = function (start, end) {
if (joinedConfig.simulateErrors && !isFontLoaded(this.fontName)) {
throw new Error("Error: font is not loaded " + this.fontName.family + " " + this.fontName.style);
}
if (joinedConfig.simulateErrors && start < 0) {
throw new Error("Error: Expected \"start\" to have value >=0");
}
if (joinedConfig.simulateErrors && end < 0) {
throw new Error("Error: Expected \"end\" to have value >=0");
}
if (joinedConfig.simulateErrors && end > this._characters.length) {
throw new Error("Error: Cannot delete characters at index greater than the length of the text");
}
this._characters =
this._characters.slice(start, end) +
(end === this._characters.length
? ""
: this._characters.slice(end + 1));
};
TextNodeStub.prototype.insertCharacters = function (start, characters, _useStyle) {
if (_useStyle === void 0) { _useStyle = "BEFORE"; }
if (joinedConfig.simulateErrors && !isFontLoaded(this.fontName)) {
throw new Error("Error: font is not loaded " + this.fontName.family + " " + this.fontName.style);
}
if (joinedConfig.simulateErrors && start < 0) {
throw new Error("Error: Expected \"start\" to have value >=0");
}
if (joinedConfig.simulateErrors && start > this._characters.length) {
throw new Error("Error: Cannot insert characters at index greater than the length of the text");
}
this._characters = [
this._characters.slice(0, start),
characters,
this._characters.slice(start)
].join("");
};
return TextNodeStub;

@@ -358,0 +394,0 @@ }());

2

package.json
{
"name": "figma-api-stub",
"version": "0.0.46",
"version": "0.0.47",
"description": "Figma API stub",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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