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 🙏

© 2024 – Pkg Stats / Ryan Hefner

frames2string

v1.1.0

Published

Live subtitled text has lots of repetitive text. This repetitive text is often a prefix of the either the whole string or substring from the last frame. As it may be a substring a simple replace first occurrence will be insufficient to produce a readabl

Downloads

5

Readme

frames2string

Live subtitled text has lots of repetitive text. This repetitive text is often a prefix of the either the whole string or substring from the last frame. As it may be a substring a simple replace first occurrence will be insufficient to produce a readable string. This module provides a simple way to transform the text into transcript like text more suited to viewing by the user and other applications.

Important always retain the frame text as the text of record and apply frames2string when presenting to a user. Consider the returned value from frames2string to be the current best transcript like text available. Updates will no doubt improve transcript production so do not rely on future versions of frames2string to provide the same output as the version you are currently using.

frames2string(array, [joinString=' '])

Example

> var frames2string = require("frames2string");
> var exampleFrames = [
  "is why the public is not warm to him.",
  "is why the public is not warm to him. The",
  "is why the public is not warm to him. The press",
  "is why the public is not warm to him. The press are",
  "is why the public is not warm to him. The press are taken",
  "is why the public is not warm to him. The press are taken with",
  "him. The press are taken with Bradley",
  "him. The press are taken with Bradley Wiggins,",
  "him. The press are taken with Bradley Wiggins, he",
  "him. The press are taken with Bradley Wiggins, he is",
  "him. The press are taken with Bradley Wiggins, he is Paul",
  "him. The press are taken with Bradley Wiggins, he is Paul Weller,",
  "Bradley Wiggins, he is Paul Weller, they",
  "Bradley Wiggins, he is Paul Weller, they are",
  "Bradley Wiggins, he is Paul Weller, they are obsessed",
  "Bradley Wiggins, he is Paul Weller, they are obsessed with",
  "Bradley Wiggins, he is Paul Weller, they are obsessed with them.",
  "they are obsessed with them. Olympians",
  "they are obsessed with them. Olympians are",
  "they are obsessed with them. Olympians are gods",
  "they are obsessed with them. Olympians are gods like",
  "they are obsessed with them. Olympians are gods like no",
  "they are obsessed with them. Olympians are gods like no other."
];
> frames2string(exampleFrames);
// is why the public is not warm to him. The press are taken with Bradley Wiggins, he is Paul Weller, they are obsessed with them. Olympians are gods like no other.