String manipulation helpers for javascript

Overview

The stable release documentation can be found here https://epeli.github.io/underscore.string/

Underscore.string Build Status

Javascript lacks complete string manipulation operations. This is an attempt to fill that gap. List of build-in methods can be found for example from Dive Into JavaScript. Originally started as an Underscore.js extension but is a full standalone library nowadays.

Upgrading from 2.x to 3.x? Please read the changelog.

Usage

For Node.js, Browserify and Webpack

Install from npm

npm install underscore.string

Require individual functions

var slugify = require("underscore.string/slugify");

slugify("Hello world!");
// => hello-world

or load the full library to enable chaining

var s = require("underscore.string");

s("   epeli  ").trim().capitalize().value();
// => "Epeli"

but especially when using with Browserify the individual function approach is recommended because using it you only add those functions to your bundle you use.

In Meteor

From your Meteor project folder

    meteor add underscorestring:underscore.string

and you'll be able to access the library with the s global from both the server and the client.

s.slugify("Hello world!");
// => hello-world

s("   epeli  ").trim().capitalize().value();
// => "Epeli"

Others

The dist/underscore.string.js file is an UMD build. You can load it using an AMD loader such as RequireJS or just stick it to a web page and access the library from the s global.

Underscore.js/Lo-Dash integration

It is still possible use as Underscore.js/Lo-Dash extension

_.mixin(s.exports());

But it's not recommended since include, contains, reverse and join are dropped because they collide with the functions already defined by Underscore.js.

Lo-Dash-FP/Ramda integration

If you want to use underscore.string with ramdajs or Lo-Dash-FP you can use underscore.string.fp.

npm install underscore.string.fp
var S = require('underscore.string.fp');
var filter = require('lodash-fp').filter;
var filter = require('ramda').filter;

filter(S.startsWith('.'), [
  '.vimrc',
  'foo.md',
  '.zshrc'
]);
// => ['.vimrc', '.zshrc']

Download

API

Individual functions

numberFormat(number, [ decimals=0, decimalSeparator='.', orderSeparator=',']) => string

Formats the numbers.

numberFormat(1000, 2);
// => "1,000.00"

numberFormat(123456789.123, 5, ".", ",");
// => "123,456,789.12300"

levenshtein(string1, string2) => number

Calculates [Levenshtein distance][ld] between two strings. [ld]: http://en.wikipedia.org/wiki/Levenshtein_distance

levenshtein("kitten", "kittah");
// => 2

capitalize(string, [lowercaseRest=false]) => string

Converts first letter of the string to uppercase. If true is passed as second argument the rest of the string will be converted to lower case.

capitalize("foo Bar");
// => "Foo Bar"

capitalize("FOO Bar", true);
// => "Foo bar"

decapitalize(string) => string

Converts first letter of the string to lowercase.

decapitalize("Foo Bar");
// => "foo Bar"

chop(string, step) => array

chop("whitespace", 3);
// => ["whi", "tes", "pac", "e"]

clean(string) => string

Trim and replace multiple spaces with a single space.

clean(" foo    bar   ");
// => "foo bar"

cleanDiacritics(string) => string

Replace diacritic characters with closest ASCII equivalents. Check the source for supported characters. Pull requests welcome for missing characters!

cleanDiacritics("ääkkönen");
// => "aakkonen"

chars(string) => array

chars("Hello");
// => ["H", "e", "l", "l", "o"]

swapCase(string) => string

Returns a copy of the string in which all the case-based characters have had their case swapped.

swapCase("hELLO");
// => "Hello"

include(string, substring) => boolean

Tests if string contains a substring.

include("foobar", "ob");
// => true

count(string, substring) => number

Returns number of occurrences of substring in string.

count("Hello world", "l");
// => 3

escapeHTML(string) => string

Converts HTML special characters to their entity equivalents. This function supports cent, yen, euro, pound, lt, gt, copy, reg, quote, amp, apos.

escapeHTML("<div>Blah blah blah</div>");
// => "&lt;div&gt;Blah blah blah&lt;/div&gt;"

unescapeHTML(string) => string

Converts entity characters to HTML equivalents. This function supports cent, yen, euro, pound, lt, gt, copy, reg, quote, amp, apos, nbsp.

unescapeHTML("&lt;div&gt;Blah&nbsp;blah blah&lt;/div&gt;");
// => "<div>Blah blah blah</div>"

insert(string, index, substring) => string

insert("Hellworld", 4, "o ");
// => "Hello world"

replaceAll(string, find, replace, [ignorecase=false]) => string

replaceAll("foo", "o", "a");
// => "faa"

isBlank(string) => boolean

isBlank(""); // => true
isBlank("\n"); // => true
isBlank(" "); // => true
isBlank("a"); // => false

join(separator, ...strings) => string

Joins strings together with given separator

join(" ", "foo", "bar");
// => "foo bar"

lines(str) => array

Split lines to an array

lines("Hello\nWorld");
// => ["Hello", "World"]

wrap(str, options) => string

Splits a line str (default '') into several lines of size options.width (default 75) using a options.seperator (default '\n'). If options.trailingSpaces is true, make each line at least width long using trailing spaces. If options.cut is true, create new lines in the middle of words. If options.preserveSpaces is true, preserve the space that should be there at the end of a line (only works if options.cut is false).

wrap("Hello World", { width:5 })
// => "Hello\nWorld"

wrap("Hello World", { width:6, seperator:'.', trailingSpaces: true })
// => "Hello .World "

wrap("Hello World", { width:5, seperator:'.', cut:true, trailingSpaces: true })
// => "Hello. Worl.d    "

wrap("Hello World", { width:5, seperator:'.', preserveSpaces: true })
// => "Hello .World"

dedent(str, [pattern]) => string

Dedent unnecessary indentation or dedent by a pattern.

Credits go to @sindresorhus. This implementation is similar to https://github.com/sindresorhus/strip-indent

dedent("  Hello\n    World");
// => "Hello\n  World"

dedent("\t\tHello\n\t\t\t\tWorld");
// => "Hello\n\t\tWorld"

dedent("    Hello\n    World", "  "); // Dedent by 2 spaces
// => "  Hello\n  World"

reverse(string) => string

Return reversed string:

reverse("foobar");
// => "raboof"

splice(string, index, howmany, substring) => string

Like an array splice.

splice("https://[email protected]/edtsech/underscore.strings", 30, 7, "epeli");
// => "https://[email protected]/epeli/underscore.strings"

startsWith(string, starts, [position]) => boolean

This method checks whether the string begins with starts at position (default: 0).

startsWith("image.gif", "image");
// => true

startsWith(".vimrc", "vim", 1);
// => true

endsWith(string, ends, [position]) => boolean

This method checks whether the string ends with ends at position (default: string.length).

endsWith("image.gif", "gif");
// => true

endsWith("image.old.gif", "old", 9);
// => true

pred(string) => string

Returns the predecessor to str.

pred("b");
// => "a"

pred("B");
// => "A"

succ(string) => string

Returns the successor to str.

succ("a");
// => "b"

succ("A");
// => "B"

titleize(string) => string

titleize("my name is epeli");
// => "My Name Is Epeli"

camelize(string, [decapitalize=false]) => string

Converts underscored or dasherized string to a camelized one. Begins with a lower case letter unless it starts with an underscore, dash or an upper case letter.

camelize("moz-transform");
// => "mozTransform"

camelize("-moz-transform");
// => "MozTransform"

camelize("_moz_transform");
// => "MozTransform"

camelize("Moz-transform");
// => "MozTransform"

camelize("-moz-transform", true);
// => "mozTransform"

classify(string) => string

Converts string to camelized class name. First letter is always upper case

classify("some_class_name");
// => "SomeClassName"

underscored(string) => string

Converts a camelized or dasherized string into an underscored one

underscored("MozTransform");
// => "moz_transform"

dasherize(string) => string

Converts a underscored or camelized string into an dasherized one

dasherize("MozTransform");
// => "-moz-transform"

humanize(string) => string

Converts an underscored, camelized, or dasherized string into a humanized one. Also removes beginning and ending whitespace, and removes the postfix '_id'.

humanize("  capitalize dash-CamelCase_underscore trim  ");
// => "Capitalize dash camel case underscore trim"

trim(string, [characters]) => string

Trims defined characters from begining and ending of the string. Defaults to whitespace characters.

trim("  foobar   ");
// => "foobar"

trim("_-foobar-_", "_-");
// => "foobar"

ltrim(string, [characters]) => string

Left trim. Similar to trim, but only for left side.

rtrim(string, [characters]) => string

Right trim. Similar to trim, but only for right side.

truncate(string, length, [truncateString = '...']) => string

truncate("Hello world", 5);
// => "Hello..."

truncate("Hello", 10);
// => "Hello"

prune(string, length, pruneString) => string

Elegant version of truncate. Makes sure the pruned string does not exceed the original length. Avoid half-chopped words when truncating.

prune("Hello, world", 5);
// => "Hello..."

prune("Hello, world", 8);
// => "Hello..."

prune("Hello, world", 5, " (read a lot more)");
// => "Hello, world" (as adding "(read a lot more)" would be longer than the original string)

prune("Hello, cruel world", 15);
// => "Hello, cruel..."

prune("Hello", 10);
// => "Hello"

words(str, delimiter=/\s+/) => array

Split string by delimiter (String or RegExp), /\s+/ by default.

words("   I   love   you   ");
// => ["I", "love", "you"]

words("I_love_you", "_");
// => ["I", "love", "you"]

words("I-love-you", /-/);
// => ["I", "love", "you"]

words("   ")
// => []

sprintf(string format, ...arguments) => string

C like string formatting. Makes use of the sprintf-js package.

This function will be removed in the next major release, use the sprintf-js package instead.

sprintf("%.1f", 1.17);
// => "1.2"

pad(str, length, [padStr, type]) => string

pads the str with characters until the total string length is equal to the passed length parameter. By default, pads on the left with the space char (" "). padStr is truncated to a single character if necessary.

pad("1", 8);
// => "       1"

pad("1", 8, "0");
// => "00000001"

pad("1", 8, "0", "right");
// => "10000000"

pad("1", 8, "0", "both");
// => "00001000"

pad("1", 8, "bleepblorp", "both");
// => "bbbb1bbb"

lpad(str, length, [padStr]) => string

left-pad a string. Alias for pad(str, length, padStr, "left")

lpad("1", 8, "0");
// => "00000001"

rpad(str, length, [padStr]) => string

right-pad a string. Alias for pad(str, length, padStr, "right")

rpad("1", 8, "0");
// => "10000000"

lrpad(str, length, [padStr]) => string

left/right-pad a string. Alias for pad(str, length, padStr, "both")

lrpad("1", 8, '0');
// => "00001000"

toNumber(string, [decimals]) => number

Parse string to number. Returns NaN if string can't be parsed to number.

toNumber("2.556");
// => 3

toNumber("2.556", 1);
// => 2.6

toNumber("999.999", -1);
// => 990

strRight(string, pattern) => string

Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.

strRight("This_is_a_test_string", "_");
// => "is_a_test_string"

strRightBack(string, pattern) => string

Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the right of the pattern or all string if no match found.

strRightBack("This_is_a_test_string", "_");
// => "string"

strLeft(string, pattern) => string

Searches a string from left to right for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.

strLeft("This_is_a_test_string", "_");
// => "This";

strLeftBack(string, pattern) => string

Searches a string from right to left for a pattern and returns a substring consisting of the characters in the string that are to the left of the pattern or all string if no match found.

strLeftBack("This_is_a_test_string", "_");
// => "This_is_a_test";

stripTags(string) => string

Removes all html tags from string.

stripTags("a <a href=\"#\">link</a>");
// => "a link"

stripTags("a <a href=\"#\">link</a><script>alert(\"hello world!\")</script>");
// => "a linkalert("hello world!")"

toSentence(array, [delimiter, lastDelimiter]) => string

Join an array into a human readable sentence.

toSentence(["jQuery", "Mootools", "Prototype"]);
// => "jQuery, Mootools and Prototype";

toSentence(["jQuery", "Mootools", "Prototype"], ", ", " unt ");
// => "jQuery, Mootools unt Prototype";

toSentenceSerial(array, [delimiter, lastDelimiter]) => string

The same as toSentence, but adjusts delimeters to use Serial comma.

toSentenceSerial(["jQuery", "Mootools"]);
// => "jQuery and Mootools"

toSentenceSerial(["jQuery", "Mootools", "Prototype"]);
// => "jQuery, Mootools, and Prototype"

toSentenceSerial(["jQuery", "Mootools", "Prototype"], ", ", " unt ");
// => "jQuery, Mootools, unt Prototype"

repeat(string, count, [separator]) => string

Repeats a string count times.

repeat("foo", 3);
// => "foofoofoo"

repeat("foo", 3, "bar");
// => "foobarfoobarfoo"

surround(string, wrap) => string

Surround a string with another string.

surround("foo", "ab");
// => "abfooab"

quote(string, quoteChar) or q(string, quoteChar) => string

Quotes a string. quoteChar defaults to ".

quote("foo", '"');
// => '"foo"';

unquote(string, quoteChar) => string

Unquotes a string. quoteChar defaults to ".

unquote('"foo"');
// => "foo"

unquote("'foo'", "'");
// => "foo"

slugify(string) => string

Transform text into an ascii slug which can be used in safely in URLs. Replaces whitespaces, accentuated, and special characters with a dash. Limited set of non-ascii characters are transformed to similar versions in the ascii character set such as ä to a.

slugify("Un éléphant à l\'orée du bois");
// => "un-elephant-a-l-oree-du-bois"

Caution: this function is charset dependent

naturalCmp(string1, string2) => number

Naturally sort strings like humans would do. None numbers are compared by their ASCII values. Note: this means "a" > "A". Use .toLowerCase if this isn't to be desired.

Just past it to Array#sort.

["foo20", "foo5"].sort(naturalCmp);
// => ["foo5", "foo20"]

toBoolean(string) => boolean

Turn strings that can be commonly considered as booleas to real booleans. Such as "true", "false", "1" and "0". This function is case insensitive.

toBoolean("true");
// => true

toBoolean("FALSE");
// => false

toBoolean("random");
// => undefined

It can be customized by giving arrays of truth and falsy value matcher as parameters. Matchers can be also RegExp objects.

toBoolean("truthy", ["truthy"], ["falsy"]);
// => true

toBoolean("true only at start", [/^true/]);
// => true

map(string, function) => string

Creates a new string with the results of calling a provided function on every character of the given string.

map("Hello world", function(x) {
  return x;
});
// => "Hello world"

map(12345, function(x) {
  return x;
});
// => "12345"

map("Hello world", function(x) {
  if (x === 'o') x = 'O';
  return x;
});
// => "HellO wOrld"

Library functions

If you require the full library you can use chaining and aliases

s(string) => chain

Start a chain. Returns an immutable chain object with the string functions as methods which return a new chain object instead of the plain string value.

The chain object includes also following native Javascript string methods:

chain.value()

Return the string value from the chain

s("  foo  ").trim().capitalize().value();
// => "Foo"

When calling a method which does not return a string the resulting value is immediately returned

s(" foobar ").trim().startsWith("foo");
// => true

chain.tap(function) => chain

Tap into the chain with a custom function

s("foo").tap(function(value){
  return value + "bar";
}).value();
// => "foobar"

Aliases

strip     = trim
lstrip    = ltrim
rstrip    = rtrim
center    = lrpad
rjust     = lpad
ljust     = rpad
contains  = include
q         = quote
toBool    = toBoolean
camelcase = camelize

Maintainers

This library is maintained by

Licence

The MIT License

Copyright (c) 2011 Esa-Matti Suuronen [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Add wrap function

    Add wrap function

    Adds a line wrapping function that limits line length to a certain width In response to issue #278

    Let me know if there's anything more I should do (more tests, documentation, etc). I'm glad to help out.

    candidate 
    opened by bsteephenson 26
  • new and simpler build workflow

    new and simpler build workflow

    This removes gulp completely. I will do the same for the gh-pages branch if you like. As you can see to release we just need to update the changelog and the version in the package.json and then run npm run release. This will allow use to have a much shorter release cycle (it's a pain atm to publish a new version).

    It also removes the build artefacts from the repo and links to npmcdn. The built artefacts are directly in the root of the module (after publishing). And it removes some eslint issues :smile_cat: closes #478

    I will have to check this again tomorrow, have to sleep first. @epeli would be cool if you could review this.

    opened by stoeffel 20
  • Fixed capitalize not converting the rest of the string to lowercase

    Fixed capitalize not converting the rest of the string to lowercase

    Capitalize (according to Wikipedia and the Ruby String#capitalize) converts the first letter to uppercase and the rest to lowercase. Implementation in this library didn't convert the remainder to lowercase.

    http://ruby-doc.org/core-2.0.0/String.html#method-i-capitalize http://en.wikipedia.org/wiki/Capitalization

    opened by abdulsattar 17
  • Update sprintf and vsprintf to make use of the sprintf-js package.

    Update sprintf and vsprintf to make use of the sprintf-js package.

    The owner (@alexei) of the current implementation of sprintf has continued development and improved the implementation. It makes sense to use of his package on npm instead of using an out-of-date copy.

    opened by jtangelder 16
  • Extract functions to separate CommonJS modules

    Extract functions to separate CommonJS modules

    Creating new issue from #354.

    Each function will be split into a separate CommonJS module like in 101

    This will mean few things

    • Browserify users can use only parts of this library by calling var slugify = require("underscore.string/slugify")
    • No changes for users who want to the full library like before
    • Contributing will become easier since less merge conflicts will occur between pull requests touching different functions

    The work has already begun in the commonjs branch

    opened by esamattis 16
  • Handling null

    Handling null

    I'm curious if this is expected behavior:

    _.trim( null )
    _.trim( undefined )
    

    which returns:

    "null"
    "undefined"
    

    Shouldn't underscore.string basically do a no-op and return null and undefined respectively rather than strings?

    opened by philoye 14
  • Es6-Modules proposal

    Es6-Modules proposal

    I moved all the functions to es6-modules. It started as an experiment, but I think it's pretty nice. The task gulp modules creates a file compiled/underscore.string.js which contains all the functions bundled to one file. The compiled file looks like this https://gist.github.com/stoeffel/80d470a9de841cc67f8b The build task still creates one minified file. So nothing changes for the user, but in my opinion this has some big advantages:

    • better structure of the project
    • less merge conflicts!

    What do you think about this change?

    opened by stoeffel 13
  • ._camelize('Sample Text') returning

    ._camelize('Sample Text') returning "SampleText", not "sampleText"

    The documentation is confusing, as it indicates the following (emphasis added):

    Converts underscored or dasherized string to a camelized one. Begins with a lower case letter unless it starts with an underscore or string

    The example that follows shows a dash utilized to prompt a lowercase letter, which is neither an underscore nor a string. Should the documentation read as underscore or dash? It wouldn't make sense that it starts with a lower case letter unless it starts with a string.

    Camelizing the phrase "Sample Text" should return "sampleText", not "SampleText".

    opened by joshuahiggins 13
  • Can you create a release?

    Can you create a release?

    We are using a library that depends on your module. They are using the latest version of your library but there is a memory leak in it. You have already fixed the leak and so would it be possible for you to create a release so that our dependency utilizes your fix?

    opened by ekawas-de 12
  • AMD define call does not work with RequireJS

    AMD define call does not work with RequireJS

    It is possible this does not work with other amd libraries.

    Passing null as the second parameter to define does not define the module with RequireJS. The following works for me in RequireJS 1.0.8 and RequireJS 2.0.1:

    define('underscore.string', _s);

    opened by jordandh 12
  • Vulnerable Regular Expression

    Vulnerable Regular Expression

    The following regular expression used in unescapeHTML is vulnerable to ReDoS:

    /\&([^;]+);/g
    

    The slowdown is moderately low: for 50.000 characters around 2 seconds matching time. However, I would still suggest one of the following:

    • remove the regex,
    • anchor the regex,
    • limit the number of characters that can be matched by the repetition,
    • limit the input size.

    If needed, I can provide an actual example showing the slowdown.

    opened by cristianstaicu 11
  • Bump minimatch and mocha

    Bump minimatch and mocha

    Bumps minimatch to 3.0.5 and updates ancestor dependency mocha. These dependencies need to be updated together.

    Updates minimatch from 3.0.4 to 3.0.5

    Commits

    Updates mocha from 5.2.0 to 10.1.0

    Release notes

    Sourced from mocha's releases.

    v10.1.0

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    v10.0.0

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    Also thanks to @​ea2305 and @​SukkaW for improvements to our documentation.

    v9.2.2

    9.2.2 / 2022-03-11

    Please also note our announcements.

    :bug: Fixes

    ... (truncated)

    Changelog

    Sourced from mocha's changelog.

    10.1.0 / 2022-10-16

    :tada: Enhancements

    :nut_and_bolt: Other

    10.0.0 / 2022-05-01

    :boom: Breaking Changes

    :nut_and_bolt: Other

    Also thanks to @​ea2305 and @​SukkaW for improvements to our documentation.

    9.2.2 / 2022-03-11

    :bug: Fixes

    :nut_and_bolt: Other

    ... (truncated)

    Commits
    • 5f96d51 build(v10.1.0): release
    • ed74f16 build(v10.1.0): update CHANGELOG
    • 51d4746 chore(devDeps): update 'ESLint' to v8 (#4926)
    • 4e06a6f fix(browser): increase contrast for replay buttons (#4912)
    • 41567df Support prefers-color-scheme: dark (#4896)
    • 61b4b92 fix the regular expression for function clean in utils.js (#4770)
    • 77c18d2 chore: use standard 'Promise.allSettled' instead of polyfill (#4905)
    • 84b2f84 chore(ci): upgrade GH actions to latest versions (#4899)
    • 023f548 build(v10.0.0): release
    • 62b1566 build(v10.0.0): update CHANGELOG
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by juergba, a new releaser for mocha since your current version.


    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • meteor version is still with 3.3.4

    meteor version is still with 3.3.4

    It seems that the meteor package have not been updated and don't have latest fix. is it possible to push the new version of the packages?

    Thanks a lot 🙏

    opened by peernohell 0
  • meteor version is still with 3.3.4

    meteor version is still with 3.3.4

    It seems that the meteor package have not been updated and don't have latest fix. is it possible to push the new version of the packages?

    Thanks a lot 🙏

    opened by peernohell 0
  • Bump ansi-regex from 3.0.0 to 3.0.1

    Bump ansi-regex from 3.0.0 to 3.0.1

    Bumps ansi-regex from 3.0.0 to 3.0.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore: remove a few files from the packaged npm release

    chore: remove a few files from the packaged npm release

    I noticed a few files in my node_modules folder that don't really need to be there. This probably saves a decent amount of network traffic and disk storage given the number of users this package has.

    opened by me4502 0
  • Potential security issue

    Potential security issue

    Hey there!

    I belong to an open source security research community, and a member (@yetingli) has found an issue, but doesn’t know the best way to disclose it.

    If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

    Thank you for your consideration, and I look forward to hearing from you!

    (cc @huntr-helper)

    opened by benharvie 0
Releases(3.2.1)
Owner
Esa-Matti Suuronen
I write code and jump from airplanes
Esa-Matti Suuronen
Lightweight URL manipulation with JavaScript

domurl 2.x (former jsurl) Lightweight URL manipulation with JavaScript for both DOM and server JavaScript. Goal To have a convenient way working with

Mykhailo Stadnyk 511 Dec 28, 2022
The ultimate JavaScript string library

Voca is a JavaScript library for manipulating strings. https://vocajs.com v.camelCase('bird flight'); // => 'birdFlight' v.sprintf('%s co

Dmitri Pavlutin 3.5k Dec 20, 2022
Extra JavaScript string methods.

string.js string.js, or simply S is a lightweight (< 5 kb minified and gzipped) JavaScript library for the browser or for Node.js that provides extra

JP Richardson 1.8k Dec 17, 2022
easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.

url-pattern easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings. This is a great little

null 562 Jan 5, 2023
A robust HTML entity encoder/decoder written in JavaScript.

he he (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports all standardized named character references as

Mathias Bynens 3.2k Dec 27, 2022
Multiline strings in JavaScript

multiline Multiline strings in JavaScript No more string concatenation or array join! Use ES2015 template literals instead whenever possible. Before c

Sindre Sorhus 1.4k Dec 30, 2022
Javascript URL mutation library

URI.js About Understanding URIs Documentation jQuery URI Plugin Author Changelog IMPORTANT: You may not need URI.js anymore! Modern browsers provide t

Medialize 6.2k Dec 30, 2022
sprintf.js is a complete open source JavaScript sprintf implementation

sprintf-js sprintf-js is a complete open source JavaScript sprintf implementation for the browser and Node.js. Note: as of v1.1.1 you might need some

Alexandru Mărășteanu 2k Jan 4, 2023
Helps to encode a string to base64 and decode a base64 string to a normal string.

@prashoonb/base64-encoder-decoder Installation npm install @prashoonb/base64-encoder-decoder API base64.encode(input) This function takes a byte strin

PrashoonB 4 Mar 29, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Lo-fi, powerful, community-driven string manipulation library.

Lo-fi, powerful, community-driven string manipulation library. This is the main monorepo codebase of Plexis.js a production-ready string manipulation

Plexis 145 Sep 24, 2022
Convert some JavaScript/TypeScript code string into a .d.ts TypeScript Declaration code string

convert-to-dts Converts the source code for any .js or .ts file into the equivalent .d.ts code TypeScript would generate. Usage import { convertToDecl

Lily Scott 11 Mar 3, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Javascript Library providing form validation helpers

Javascript-Form-Validation Javascript Library providing form validation helpers Table of contents Installation Usage Include Library Use components Co

Benoit Gambier 13 Mar 25, 2022
Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺

squirrelly Documentation - Chat - RunKit Demo - Playground Summary Squirrelly is a modern, configurable, and blazing fast template engine implemented

Squirrelly 451 Jan 2, 2023
🤝 A set of Persian Helpers for NodeJS to make your life easier

Persian Helpers Persian Helpers is a minimal NodeJS package with a set of helpers/tools specifically for the Persian/Farsi language. If you like the p

Kasra Ghoreyshi 11 Dec 22, 2022
Multi-step wizard helpers for Alpine.js

Alpine Wizard This package provides an Alpine directive (x-wizard) and a magic helper ($wizard) that allow you to quickly build multi-step wizards usi

Galahad 74 Dec 23, 2022
Utilities library built on top of Next.js providing feature extensions and helpers for common patterns

nextjs-utilites This library provides many helpful utilities for use in Next.js projects. Prerequisites This project requires NodeJS (version 8 or lat

Snehil K 5 Sep 7, 2022