npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

string_editor

v1.2.0

Published

string edit with add, jump, go operations.

Downloads

23

Readme

String Editor, add, remove any part of string.

Build Status

NPM

Install

	npm install string_editor

Example code

var StringEditor = require('string_editor');
var stringEditor = new StringEditor();

var sourceString = ' JavaScript is one of the 3 languages all web developers must learn: \n' +
	'\t1. HTML to define the content of web pages \n' +
	'\t2. CSS to specify the layout of web pages \n' +
	'\t3. JavaScript to program the behavior of web pages \n' +
	'This tutorial is about JavaScript, and how JavaScript works with HTML and CSS.';

console.log('\n----START SOURCE_STRING ----\n' + sourceString + '\n----END SOURCE_STRING ----\n');

stringEditor.start(sourceString); // start editing
console.log(stringEditor.addFrom(' js ', 'JavaScript'); // ' js ' add first 'JavaScript'
console.log(stringEditor.go('\n'); // copy from current index  to '\n'.
console.log(stringEditor.jump('\n', 2); // don't copy from current index 2 times to '\n'. (likes remove)
console.log(stringEditor.go('\n'); // again copy  from current index to '\n'.
stringEditor.addStr(' STRING_EDITOR\n\t'); // add to current index
console.log(stringEditor.addFrom(' JS ', 'JavaScript'); // add to  from current index to  'JavaScript'
var res = stringEditor.update(); // update editing, returns new string. (same like call finish then start ).

console.log('\n----START RESULT_STRING ----\n' + res + '\n----END RESULT_STRING ----\n');

console.log(stringEditor.remove('JavaScript', 'CSS')); // remove between from , to strings.
console.log(stringEditor.addFrom('CSS', 'JavaScript'));
console.log(stringEditor.jump('\n', 2));
console.log(stringEditor.go('\n', 3));
stringEditor.addStr(' STRING_EDITOR\n\t');
res = stringEditor.finish(); // finish editing and returns new string.

console.log('\n----START RESULT2_STRING ----\n' + res + '\n----END RESULT2_STRING ----\n');

// output:
/** 
----START SOURCE_STRING ----
 JavaScript is one of the 3 languages all web developers must learn:
        1. HTML to define the content of web pages
        2. CSS to specify the layout of web pages
        3. JavaScript to program the behavior of web pages
This tutorial is about JavaScript, and how JavaScript works with HTML and CSS.
----END SOURCE_STRING ----

true  // result of addFrom(' js ', 'JavaScript')
1     // result of go('\n')
2     // result of jump('\n', 2)
1     // result of go('\n')
true  // result of addFrom(' JS ', 'JavaScript')

----START RESULT_STRING ----
 JavaScript js  is one of the 3 languages all web developers must learn:
        3. JavaScript to program the behavior of web pages
 STRING_EDITOR
        This tutorial is about JavaScript JS , and how JavaScript works with HTM
L and CSS.
----END RESULT_STRING ----

true  // result of remove('JavaScript', 'CSS')
false // result of addFrom('CSS', 'JavaScript')
0     // result of jump('\n', 2)
0     // result of go('\n', 3)

----START RESULT2_STRING ----
 JavaScript STRING_EDITOR
        CSS.
----END RESULT2_STRING ----
*/