Socket
Socket
Sign inDemoInstall

string-alter

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.2 to 0.7.3

45

build/es5/StringAlter.js

@@ -5,7 +5,7 @@ var SLICE$0 = Array.prototype.slice;function ITER$0(v,f){if(v){if(Array.isArray(v))return f?v.slice():v;var i,r;if(typeof v==='object'&&typeof v['@@iterator']==='function'){i=v['@@iterator'](),r=[];while((f=i['next']()),f['done']!==true)r.push(f['value']);return r;}}throw new Error(v+' is not iterable')};/*global module*/

var BUILD_VERSION = '0.7.2';
var BUILD_VERSION = '0.7.3';
var RangeIndex = _573457601397589148529_1_require_rangeindex();
var RangeOffset = _4704933811397589148041_1_require___RangeOffset_js();
var Record = _4704933811397589148041_2_require___Record_js();
var RangeIndex = _439001921409571392515_1_require_rangeindex();
var RangeOffset = _1534407511409571392001_1_require___RangeOffset_js();
var Record = _1534407511409571392001_2_require___Record_js();

@@ -593,2 +593,4 @@ var assert = this["assert"] || (function(expect, msg) { if(expect != true)throw new Error(msg || "") });

var isSubFragmentsOffset = false;
var subFragments = frag$0.getSubs();

@@ -615,2 +617,4 @@ if( subFragments ) {

outs = [];
isSubFragmentsOffset = true;
;$D$2 = void 0}

@@ -684,6 +688,6 @@

if( newIsAdding ) {
offsets.addInsert(frag$0.record.from, offset);
offsets.addInsert(frag$0.record.from, offset, isSubFragmentsOffset);
}
else {
offsets.addRange(frag$0.record.from, frag$0.record.to, offset);
offsets.addRange(frag$0.record.from, frag$0.record.to, offset, void 0, isSubFragmentsOffset);
}

@@ -741,3 +745,3 @@

StringAlter.prototype.checkFragmentRange = function(fragment) {
StringAlter.prototype.checkFragmentRange = function(fragment) {//TODO:: warnings
// TODO:: check methods 'move', 'replace', etc for calling with the same parameters, what is the function already was called

@@ -778,3 +782,3 @@

else {
assert(false, 'This string block has already been removed');
assert(false, (("This string block(" + from) + (", " + to) + ") has already been removed"));
}

@@ -834,3 +838,3 @@ }

;function _4704933811397589148041_1_require___RangeOffset_js(){var module = {exports: {}};/*global module*/
;function _1534407511409571392001_1_require___RangeOffset_js(){var module = {exports: {}};/*global module*/
/*es6-transpiler has-iterators:false, has-generators:false*/

@@ -844,13 +848,13 @@ "use strict";

RangeOffset.prototype.addInsert = function(to, offset) {
this.addRange(to, to, offset, true);
RangeOffset.prototype.addInsert = function(to, offset, isSpecialOffset) {
this.addRange(to, to, offset, true, isSpecialOffset);
}
RangeOffset.prototype.addRemove = function(from, to) {
RangeOffset.prototype.addRemove = function(from, to, isSpecialOffset) {
while( from++ < to ) {
this.addRange(void 0, from, -1);
this.addRange(void 0, from, -1, void 0, isSpecialOffset);
}
}
RangeOffset.prototype.addRange = function(from, to, offset) {var newIsAdding = arguments[3];if(newIsAdding === void 0)newIsAdding = false;
RangeOffset.prototype.addRange = function(from, to, offset) {var newIsAdding = arguments[3];if(newIsAdding === void 0)newIsAdding = false;var isSpecialOffset = arguments[4];if(isSpecialOffset === void 0)isSpecialOffset = false;
if( !offset ) {

@@ -871,3 +875,10 @@ return;

// this is an old logic:
from = from + (-offset - 1);
if ( isSpecialOffset ) {
// for cases with sub fragments
// TODO:: tests
from = to;
}
else {
from = from + (-offset - 1);
}
}

@@ -996,3 +1007,3 @@

;return module.exports};
;function _4704933811397589148041_2_require___Record_js(){var module = {exports: {}};/*global module*/
;function _1534407511409571392001_2_require___Record_js(){var module = {exports: {}};/*global module*/
/*es6-transpiler has-iterators:false, has-generators:false*/

@@ -1032,3 +1043,3 @@ "use strict";

;return module.exports};
;function _573457601397589148529_1_require_rangeindex(){var module = {exports: {}};"use strict";
;function _439001921409571392515_1_require_rangeindex(){var module = {exports: {}};"use strict";

@@ -1035,0 +1046,0 @@ var BUILD_VERSION = '0.0.4';

{
"name": "string-alter",
"version": "0.7.2",
"version": "0.7.3",
"description": "String alter",

@@ -5,0 +5,0 @@ "main": "./build/es5/StringAlter.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc