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

@cdxoo/block-quote

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cdxoo/block-quote - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

package.json
{
"name": "@cdxoo/block-quote",
"version": "1.0.0",
"version": "1.0.1",
"description": "simple indent sanitization for multi line strings",

@@ -24,6 +24,5 @@ "main": "src/index.js",

"devDependencies": {
"chai": "^4.2.0",
"mocha": "^7.1.1"
},
"dependencies": {}
"chai": "^4.3.4",
"mocha": "^8.4.0"
}
}

@@ -34,3 +34,3 @@ function blockquote (call_site, ...placeholder_values) {

var arg = placeholder_values[i].replace(
var arg = String(placeholder_values[i]).replace(
/\n/g,

@@ -37,0 +37,0 @@ '\n' + ' '.repeat(local_indent)

@@ -6,3 +6,3 @@ 'use strict';

describe('block-quote', () => {
it('trims beginning/end wheitespace', () => {
it('trims beginning/end whitespace', () => {
var str = blockquote` 2B or not 2A

@@ -69,2 +69,22 @@ `;

it('handles non string placeholder values properly', () => {
var arrival = (date) => {
var a = {
t: new Date(date).getTime(),
}
a.toString = () => new Date(a.t).toISOString();
return a;
};
var str = blockquote`
Friendly Arm
Arrival: ${arrival('1234-01-01T12:00:00.000Z')}
Nashkell
Arrival: ${arrival('1234-02-11T13:30:00.000Z')}
`;
//console.log(str);
expect(str).to.equal(
"Friendly Arm\n Arrival: 1234-01-01T12:00:00.000Z\nNashkell\n Arrival: 1234-02-11T13:30:00.000Z"
);
})
it('throws when called as function and call_site isnt an array', () => {

@@ -71,0 +91,0 @@ var error = undefined;

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