Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

fretted-strings

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fretted-strings - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
package.json
{
"name": "fretted-strings",
"version": "1.0.0",
"version": "1.0.1",
"description": "Mark on your strings and get it's position",

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

+28
-21

@@ -15,5 +15,6 @@ # fretted-strings

```ts
import { mark, Frets } from 'fretted-strings';
const assert = require('assert');
const { mark } = require('fretted-strings');
const frets: Frets = {};
const frets = {};
const content = mark(

@@ -29,3 +30,3 @@ `

// Function `mark` returns a string which is removed lines enclosed by '%%%' tags from the parameter.
assert(
assert.equal(
content,

@@ -39,7 +40,9 @@ `

// as identifier under the `^` character to 2nd parameter.
assert(frets.p1.line, 1);
assert(frets.p1.col, 6);
assert.equal(frets.p1.pos, 7);
assert.equal(frets.p1.line, 1);
assert.equal(frets.p1.character, 6);
assert(frets.p2.line, 1);
assert(frets.p2.col, 13);
assert.equal(frets.p2.pos, 14);
assert.equal(frets.p2.line, 1);
assert.equal(frets.p2.character, 13);
```

@@ -50,3 +53,3 @@

```ts
import { setOptions, mark, Frets } from 'fretted-strings';
const { mark } = require('fretted-strings');

@@ -58,10 +61,12 @@ setOptions({

const frets: Frets = {};
const frets = {};
mark(
`<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>`,
`
<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>
`,
frets,

@@ -74,3 +79,3 @@ );

```ts
import { FretsMarker, Frets } from 'fretted-strings';
const { mark } = require('fretted-strings');

@@ -82,10 +87,12 @@ const marker = new FretsMarker({

const frets: Frets = {};
const frets = {};
marker.mark(
`<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>`,
`
<html>
<div>hogehoge</div>
<!--%% ^ %%-->
<!--%% p %%-->
</html>
`,
frets,

@@ -92,0 +99,0 @@ );