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

string-kit

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-kit - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

1

bdd-spec.md

@@ -186,3 +186,4 @@ # TOC

expect( string.inspect( object ) ).to.be( '<Object> <object> {\n a: "A" <string>(1)\n b: 2 <number>\n str: "Woot\\nWoot\\rWoot\\tWoot" <string>(19)\n sub: <Object> <object> {\n u: undefined\n n: null\n t: true\n f: false\n circular: <Object> <object> [circular]\n }\n emptyString: "" <string>(0)\n emptyObject: <Object> <object> {}\n list: <Array>(3) <object> {\n [0] "one" <string>(3)\n [1] "two" <string>(3)\n [2] "three" <string>(5)\n length: 3 <number> <-conf -enum>\n }\n emptyList: <Array>(0) <object> {\n length: 0 <number> <-conf -enum>\n }\n sparseArray: <Array>(21) <object> {\n [3] "three" <string>(5)\n [10] "ten" <string>(3)\n [20] "twenty" <string>(6)\n length: 21 <number> <-conf -enum>\n customProperty: "customProperty" <string>(14)\n }\n hello: <Function> hello(0) <function>\n anonymous: <Function> (anonymous)(0) <function>\n class: <Function> MyClass(0) <function>\n instance: <MyClass> <object> {\n variable: 1 <number>\n }\n buf: <Buffer 54 68 69 73 20 69 73 20 61 20 62 75 66 66 65 72 21> <Buffer>(17)\n c: "3" <string>(1) <-conf -enum -w>\n d: <getter/setter> {\n get: <Function> (anonymous)(0) <function>\n set: <Function> (anonymous)(1) <function>\n }\n}\n' ) ;
//console.log( string.inspect( { style: 'color' } , object ) ) ;
```

@@ -32,3 +32,2 @@ /*

var tree = require( 'tree-kit' ) ;
var term = require( 'terminal-kit' ) ;

@@ -536,3 +535,43 @@

// To solve dependency hell, we do not use terminal-kit anymore.
var ansi = {
reset: '\x1b[0m' ,
bold: '\x1b[1m' ,
italic: '\x1b[3m' ,
underline: '\x1b[4m' ,
defaultColor: '\x1b[39m' ,
black: '\x1b[30m' ,
red: '\x1b[31m' ,
green: '\x1b[32m' ,
yellow: '\x1b[33m' ,
blue: '\x1b[34m' ,
magenta: '\x1b[35m' ,
cyan: '\x1b[36m' ,
white: '\x1b[37m' ,
brightBlack: '\x1b[90m' ,
brightRed: '\x1b[91m' ,
brightGreen: '\x1b[92m' ,
brightYellow: '\x1b[93m' ,
brightBlue: '\x1b[94m' ,
brightMagenta: '\x1b[95m' ,
brightCyan: '\x1b[96m' ,
brightWhite: '\x1b[97m' ,
} ;
inspectStyle.color = tree.extend( null , {} , inspectStyle.none , {
limit: function( str ) { return ansi.bold + ansi.brightRed + str + ansi.reset ; } ,
type: function( str ) { return ansi.italic + ansi.brightBlack + str + ansi.reset ; } ,
constant: function( str ) { return ansi.cyan + str + ansi.reset ; } ,
funcName: function( str ) { return ansi.italic + ansi.magenta + str + ansi.reset ; } ,
constructorName: function( str ) { return ansi.magenta + str + ansi.reset ; } ,
length: function( str ) { return ansi.italic + ansi.brightBlack + str + ansi.reset ; } ,
key: function( str ) { return ansi.green + str + ansi.reset ; } ,
index: function( str ) { return ansi.blue + str + ansi.reset ; } ,
number: function( str ) { return ansi.cyan + str + ansi.reset ; } ,
inspect: function( str ) { return ansi.cyan + str + ansi.reset ; } ,
string: function( str ) { return ansi.blue + str + ansi.reset ; }
} ) ;
/* Code using terminal-kit:
inspectStyle.color = tree.extend( null , {} , inspectStyle.none , {
limit: term.str.bold.brightRed ,

@@ -550,2 +589,3 @@ type: term.str.italic.brightBlack ,

} ) ;
*/

@@ -552,0 +592,0 @@ inspectStyle.html = tree.extend( null , {} , inspectStyle.none , {

3

package.json
{
"name": "string-kit",
"version": "0.0.17",
"version": "0.0.18",
"description": "A string manipulation toolbox, featuring a string formatter (inspired by sprintf), a variable inspector (output featuring ANSI colors and HTML) and various escape functions (shell argument, regexp, html, etc).",

@@ -10,3 +10,2 @@ "main": "lib/string.js",

"dependencies": {
"terminal-kit": "^0.3.5",
"tree-kit": "^0.3.1"

@@ -13,0 +12,0 @@ },

@@ -452,3 +452,4 @@

expect( string.inspect( object ) ).to.be( '<Object> <object> {\n a: "A" <string>(1)\n b: 2 <number>\n str: "Woot\\nWoot\\rWoot\\tWoot" <string>(19)\n sub: <Object> <object> {\n u: undefined\n n: null\n t: true\n f: false\n circular: <Object> <object> [circular]\n }\n emptyString: "" <string>(0)\n emptyObject: <Object> <object> {}\n list: <Array>(3) <object> {\n [0] "one" <string>(3)\n [1] "two" <string>(3)\n [2] "three" <string>(5)\n length: 3 <number> <-conf -enum>\n }\n emptyList: <Array>(0) <object> {\n length: 0 <number> <-conf -enum>\n }\n sparseArray: <Array>(21) <object> {\n [3] "three" <string>(5)\n [10] "ten" <string>(3)\n [20] "twenty" <string>(6)\n length: 21 <number> <-conf -enum>\n customProperty: "customProperty" <string>(14)\n }\n hello: <Function> hello(0) <function>\n anonymous: <Function> (anonymous)(0) <function>\n class: <Function> MyClass(0) <function>\n instance: <MyClass> <object> {\n variable: 1 <number>\n }\n buf: <Buffer 54 68 69 73 20 69 73 20 61 20 62 75 66 66 65 72 21> <Buffer>(17)\n c: "3" <string>(1) <-conf -enum -w>\n d: <getter/setter> {\n get: <Function> (anonymous)(0) <function>\n set: <Function> (anonymous)(1) <function>\n }\n}\n' ) ;
//console.log( string.inspect( { style: 'color' } , object ) ) ;
```

@@ -208,2 +208,3 @@ /*

expect( string.inspect( object ) ).to.be( '<Object> <object> {\n a: "A" <string>(1)\n b: 2 <number>\n str: "Woot\\nWoot\\rWoot\\tWoot" <string>(19)\n sub: <Object> <object> {\n u: undefined\n n: null\n t: true\n f: false\n circular: <Object> <object> [circular]\n }\n emptyString: "" <string>(0)\n emptyObject: <Object> <object> {}\n list: <Array>(3) <object> {\n [0] "one" <string>(3)\n [1] "two" <string>(3)\n [2] "three" <string>(5)\n length: 3 <number> <-conf -enum>\n }\n emptyList: <Array>(0) <object> {\n length: 0 <number> <-conf -enum>\n }\n sparseArray: <Array>(21) <object> {\n [3] "three" <string>(5)\n [10] "ten" <string>(3)\n [20] "twenty" <string>(6)\n length: 21 <number> <-conf -enum>\n customProperty: "customProperty" <string>(14)\n }\n hello: <Function> hello(0) <function>\n anonymous: <Function> (anonymous)(0) <function>\n class: <Function> MyClass(0) <function>\n instance: <MyClass> <object> {\n variable: 1 <number>\n }\n buf: <Buffer 54 68 69 73 20 69 73 20 61 20 62 75 66 66 65 72 21> <Buffer>(17)\n c: "3" <string>(1) <-conf -enum -w>\n d: <getter/setter> {\n get: <Function> (anonymous)(0) <function>\n set: <Function> (anonymous)(1) <function>\n }\n}\n' ) ;
//console.log( string.inspect( { style: 'color' } , object ) ) ;
} ) ;

@@ -210,0 +211,0 @@ } ) ;

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