Questions tagged [underscore.string.js]
Underscore.string is a string manipulation extension for JavaScript
underscore.string.js
11
questions
0
votes
2
answers
34
views
Underscore Remove the Value without replace original variable
I have an array of objects and I'm trying to find the value in the object and remove the value has been found in the exist object. For example,
Current JSON Object:
exist=[{"x":6811,"y":15551,"a":["...
0
votes
2
answers
688
views
Underscore, Nested Group By and Generate a JSON
I have an array of objects with duplicates and I'm trying to get a unique listing, where uniqueness is defined by a subset of the properties of the object. For example,
Current JSON Object:
[{"x":...
0
votes
1
answer
181
views
How to use underscore.string globally in a web page (with requireJS)
The documentation says once underscore.string included in my application, the library is available using s, __s global variables (http://epeli.github.io/underscore.string/#others), or within ...
2
votes
1
answer
32
views
how to apply a between operation globally for a string
I have an html string with multiple table tags.
String str = '<table>......</table> <table>....</table>';
when I use string.js and the following code.
S(str).between('&...
0
votes
1
answer
482
views
Cannot Call the Underscore.String Function `lpad` for Error `Uncaught TypeError: _.lpad is not a function`
I want to call the function _.lpad('1', 2, '0') but chrome shows me that Uncaught TypeError: _.lpad is not a function. I already included the script tags in the HTML file like the following.
<...
0
votes
3
answers
615
views
How to check a Javascript array that contains at least one value that starts with a particular text (eg. ROLE_)
I have the below javascript 'underscore' code which checks if the given USER_ROLES has at least one VALID_ROLES. If so returns true else false.
It works fine.
But I want to refactor it such that I ...
0
votes
0
answers
23
views
underscores word wrap function removes escape characters
consider the following string:
hello \\c[12]there\\c[0]
When passed to the wrap it translates the string to:
hello
\c[12]there\c[0]
How ever I want it to return:
hello
\\c[12]there\\c[0]
Any ...
0
votes
2
answers
1k
views
How to use underscore.strings with AngularJs
I'm having trouble getting underscore.strings working with AngularJS.
The documentation around underscore.strings always shows examples with requireJs which I don't think is appropriate for AngularJS....
0
votes
3
answers
912
views
Lodash and underscore.string into AngularJS application
The question is simple, how to successfully implement Lodash with underscore.string library into AngularJS project?
It is necessary to use RequireJS to achieve this?
0
votes
2
answers
83
views
How to convert html correctly in javascript?
I need to convert snippets of text that contain html tags into plain text using Javascript / Node.Js.
I currently use String.Js library for that, but the problem is that when it removes the tags (...
3
votes
1
answer
1k
views
Underscore.string browser support
Underscore.string seems to provide nice features for javascript string manipulation.
It seems to have all the good points:
license : MIT
dependencies : none, it is an extension for Underscore.js but ...