New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

node-stringbuilder

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-stringbuilder - npm Package Compare versions

Comparing version
2.1.1
to
2.2.0
+2
-2
build/Makefile

@@ -311,4 +311,4 @@ # We borrow heavily from the kernel build setup, though we are simpler since

quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/magiclen/npm/node-stringbuilder/build/config.gypi -I/usr/local/lib/node_modules/node-gyp/addon.gypi -I/home/magiclen/.node-gyp/8.4.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/magiclen/.node-gyp/8.4.0" "-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp" "-Dnode_lib_file=/home/magiclen/.node-gyp/8.4.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/magiclen/npm/node-stringbuilder" "-Dnode_engine=v8" binding.gyp
Makefile: $(srcdir)/../../.node-gyp/8.4.0/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../usr/local/lib/node_modules/node-gyp/addon.gypi
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/magiclen/npm/node-stringbuilder/build/config.gypi -I/usr/local/lib/node_modules/node-gyp/addon.gypi -I/home/magiclen/.node-gyp/8.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/magiclen/.node-gyp/8.6.0" "-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp" "-Dnode_lib_file=/home/magiclen/.node-gyp/8.6.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/magiclen/npm/node-stringbuilder" "-Dnode_engine=v8" binding.gyp
Makefile: $(srcdir)/../../.node-gyp/8.6.0/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../usr/local/lib/node_modules/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)

@@ -315,0 +315,0 @@

@@ -38,6 +38,6 @@ # This file is generated by gyp; do not edit.

INCS_Debug := \
-I/home/magiclen/.node-gyp/8.4.0/include/node \
-I/home/magiclen/.node-gyp/8.4.0/src \
-I/home/magiclen/.node-gyp/8.4.0/deps/uv/include \
-I/home/magiclen/.node-gyp/8.4.0/deps/v8/include
-I/home/magiclen/.node-gyp/8.6.0/include/node \
-I/home/magiclen/.node-gyp/8.6.0/src \
-I/home/magiclen/.node-gyp/8.6.0/deps/uv/include \
-I/home/magiclen/.node-gyp/8.6.0/deps/v8/include

@@ -74,6 +74,6 @@ DEFS_Release := \

INCS_Release := \
-I/home/magiclen/.node-gyp/8.4.0/include/node \
-I/home/magiclen/.node-gyp/8.4.0/src \
-I/home/magiclen/.node-gyp/8.4.0/deps/uv/include \
-I/home/magiclen/.node-gyp/8.4.0/deps/v8/include
-I/home/magiclen/.node-gyp/8.6.0/include/node \
-I/home/magiclen/.node-gyp/8.6.0/src \
-I/home/magiclen/.node-gyp/8.6.0/deps/uv/include \
-I/home/magiclen/.node-gyp/8.6.0/deps/v8/include

@@ -80,0 +80,0 @@ OBJS := \

{
"name": "node-stringbuilder",
"version": "2.1.1",
"version": "2.2.0",
"description": "An easy and fast in-memory string builder for Node.js.",
"main": "index.js",
"scripts": {
"test": "mocha --napi-modules --reporter spec",
"benchmark": "mocha --napi-modules --reporter spec benchmark"
"test": "mocha --reporter spec",
"benchmark": "mocha --reporter spec benchmark"
},

@@ -30,7 +30,7 @@ "repository": {

"engines": {
"node": ">=8.4.0"
"node": ">=8.6.0"
},
"devDependencies": {
"chai": "^4.1.1",
"mocha": "^3.5.0",
"chai": "^4.1.2",
"mocha": "^3.5.3",
"mocha-logger": "^1.0.5"

@@ -37,0 +37,0 @@ },

Sorry, the diff of this file is not supported yet

'use strict';
const expect = require('chai').expect;
const StringBuilder = require('../index');
describe('#append', function() {
it('should append text', function() {
var sb = StringBuilder.from('First');
sb.append(', Second').append(', Third');
var result = sb.toString();
expect(result).to.equal('First, Second, Third');
});
it('should append text', function() {
var sb = StringBuilder.from('');
sb.append('First').append(', Second').append(', Third');
var result = sb.toString();
expect(result).to.equal('First, Second, Third');
});
it('should append text and line, and finally trim the whitespace', function() {
var sb = StringBuilder.from('');
sb.appendLine('First').appendLine('Second').appendLine('Third');
var result = sb.trim().toString();
expect(result).to.equal('First\nSecond\nThird');
});
it('should append text repeatedly, finally delete the last two characters', function() {
var sb = StringBuilder.from('');
sb.appendRepeat('Three, ', 3).delete(-2);
var result = sb.trim().toString();
expect(result).to.equal('Three, Three, Three');
});
});
describe('#insert', function() {
it('should insert text at head', function() {
var sb = StringBuilder.from(', Second');
sb.insert('First').append(', Third');
var result = sb.toString();
expect(result).to.equal('First, Second, Third');
});
it('should insert text at middle', function() {
var sb = StringBuilder.from('First');
sb.append(', Third').insert(5, ', Second');
var result = sb.toString();
expect(result).to.equal('First, Second, Third');
});
it('should insert text at end', function() {
var sb = StringBuilder.from('First');
sb.insert(sb.length(), ', Second').insert(sb.length(), ', Third');
var result = sb.toString();
expect(result).to.equal('First, Second, Third');
});
});

Sorry, the diff of this file is too big to display