You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CAUTION.md
+3
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,9 @@ Drop it in before upgrading to get a general idea of what needs to change, or up
109
109
- Level: Major
110
110
-`Array#all`, `Array#any`, `Object.all`, and `Object.any` aliases were removed to align Sugar more with native methods. If needed, these can still easily be aliased with `Sugar.Array.alias('all', 'every');`.
111
111
112
+
- Level: Major
113
+
-`String#paragraphs` was removed.
114
+
112
115
- Level: Moderate
113
116
-`Object.keys` and `Object.values` no longer have callbacks as second arguments. Use `Object.forEach` for iteration over an object's properties.
Copy file name to clipboardexpand all lines: test/tests/string.js
-25
Original file line number
Diff line number
Diff line change
@@ -458,31 +458,6 @@ namespace('String', function () {
458
458
459
459
});
460
460
461
-
method('paragraphs',function(){
462
-
463
-
varcounter=0;
464
-
varessay='the history of the united states\n\n';
465
-
essay+='it all began back in 1776 when someone declared something from someone.\n';
466
-
essay+='it was at this point that we had to get our rears in gear\n\n';
467
-
essay+='The British got their revenge in the late 60s with the British Invasion,\n';
468
-
essay+='which claimed the lives of over 32,352 young women across the nation.\n\n\n\n\n';
469
-
essay+='The End\n\n\n\n\n\n\n';
470
-
varparagraphs=['the history of the united states','it all began back in 1776 when someone declared something from someone.\nit was at this point that we had to get our rears in gear','The British got their revenge in the late 60s with the British Invasion,\nwhich claimed the lives of over 32,352 young women across the nation.','The End'];
471
-
varindexes=[0,1,2,3];
472
-
varcallback=function(p,i,a){
473
-
equal(p,paragraphs[i],'First argument should be the paragraph.');
474
-
equal(i,indexes[i],'Second argument should be the index.');
475
-
equal(a,paragraphs,'Third argument the array of paragraphs.');
476
-
counter++;
477
-
};
478
-
varresult=run(essay,'paragraphs',[callback]);
479
-
equal(counter,4,'should have run 4 times');
480
-
equal(result,paragraphs,'result should be an array of matches');
0 commit comments