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

@jsyg/strutils

v1.0.0

Published

String utilitaries for JSYG framework or standalone

Readme

@jsyg/strutils

String utilitaries for JSYG framework or standalone.

Installation

npm install @jsyg/strutils

API

Table of Contents

base64encode

Encode une chaîne en base 64.

Parameters
  • input chaîne à encoder

Returns String

base64decode

Décode une chaîne codée en base 64.

Parameters
  • input chaîne à décoder

Returns String

urlencode

Formate une chaîne pour transmission par chaîne de requête

Parameters
  • str chaîne à formater

Returns String

urldecode

Decode une chaîne après transmission par chaîne de requête

Parameters
  • str chaîne à décoder

Returns String

ucfirst

Met la première lettre de la chaîne en majuscule

Parameters
  • str chaîne à analyser

Returns String

lcfirst

Met la première lettre de la chaîne en minuscule

Parameters
  • str chaîne à analyser

Returns String

ucwords

Met la première lettre de chaque mot en majuscule

Parameters
  • str chaîne à analyser

Returns String

stripAccents

Retire les accents de la chaîne

Parameters
  • str chaîne à analyser

Returns String

stripTags

  • See: stripTagsR

Retire les balises de la chaîne

Parameters
  • str chaîne à analyser
  • allowed balise autorisée. Le nombre d'arguments n'est pas limité.
Examples
stripTags('<tata>toto</tata>','br','span') == 'toto';

Returns String

stripTagsR

  • See: stripTags

Retire les balises de la chaîne. A la différence de stripTags, cette méthode fonction avec une liste noire plutôt qu'une liste blanche.

Parameters
  • str chaîne à analyser
  • forbidden balise à retirer. Le nombre d'arguments n'est pas limité.

Returns String

stripAttributes

Retire les attributs des balises

Parameters
  • str chaîne à analyser

Returns String

getTagContent

Récupère le(s) contenu(s) d'une balise donnée sous forme de tableau de chaînes

Parameters
  • str chaîne à analyser
  • tag nom de la balise dont on veut récupèrer le contenu

Returns Array chaque élément du tableau est le contenu d'une balise tag

stripTagAndContent

Retire les balises et leur contenu

Parameters
  • str String chaîne à analyser
  • tag String nom de la balise à supprimer
  • content Array tableau qui sera rempli par le contenu des balises trouvées (les tableaux passent par référence)

camelize

Transforme la chaîne en chaîne de type camelCase (style javascript, les majuscules remplacent les espaces/tirets/underscores)

Parameters
  • str chaîne à analyser

Returns String

dasherize

Remplace les majuscules d'une chaîne camelCase par un tiret

Parameters
  • str chaîne à analyser

Returns String