mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Replace wrapper with wrapped in docs/tests.
This commit is contained in:
@@ -6046,16 +6046,16 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var array = [1, 2];
|
* var array = [1, 2];
|
||||||
* var wrapper = _(array).push(3);
|
* var wrapped = _(array).push(3);
|
||||||
*
|
*
|
||||||
* console.log(array);
|
* console.log(array);
|
||||||
* // => [1, 2]
|
* // => [1, 2]
|
||||||
*
|
*
|
||||||
* wrapper = wrapper.commit();
|
* wrapped = wrapped.commit();
|
||||||
* console.log(array);
|
* console.log(array);
|
||||||
* // => [1, 2, 3]
|
* // => [1, 2, 3]
|
||||||
*
|
*
|
||||||
* wrapper.last();
|
* wrapped.last();
|
||||||
* // => 3
|
* // => 3
|
||||||
*
|
*
|
||||||
* console.log(array);
|
* console.log(array);
|
||||||
@@ -6077,9 +6077,9 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var array = [1, 2];
|
* var array = [1, 2];
|
||||||
* var wrapper = _(array).concat([3], 4);
|
* var wrapped = _(array).concat([3], 4);
|
||||||
*
|
*
|
||||||
* console.log(wrapper.value());
|
* console.log(wrapped.value());
|
||||||
* // => [1, 2, 3, 4]
|
* // => [1, 2, 3, 4]
|
||||||
*
|
*
|
||||||
* console.log(array);
|
* console.log(array);
|
||||||
@@ -6102,17 +6102,17 @@
|
|||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* var array = [1, 2];
|
* var array = [1, 2];
|
||||||
* var wrapper = _(array).map(function(value) {
|
* var wrapped = _(array).map(function(value) {
|
||||||
* return Math.pow(value, 2);
|
* return Math.pow(value, 2);
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* var other = [3, 4];
|
* var other = [3, 4];
|
||||||
* var otherWrapper = wrapper.plant(other);
|
* var otherWrapped = wrapped.plant(other);
|
||||||
*
|
*
|
||||||
* otherWrapper.value();
|
* otherWrapped.value();
|
||||||
* // => [9, 16]
|
* // => [9, 16]
|
||||||
*
|
*
|
||||||
* wrapper.value();
|
* wrapped.value();
|
||||||
* // => [1, 4]
|
* // => [1, 4]
|
||||||
*/
|
*/
|
||||||
function wrapperPlant(value) {
|
function wrapperPlant(value) {
|
||||||
|
|||||||
12
test/test.js
12
test/test.js
@@ -17158,9 +17158,9 @@
|
|||||||
|
|
||||||
test('should track the `__chain__` value of a wrapper', 2, function() {
|
test('should track the `__chain__` value of a wrapper', 2, function() {
|
||||||
if (!isNpm) {
|
if (!isNpm) {
|
||||||
var wrapper = _([1]).chain().commit().first();
|
var wrapped = _([1]).chain().commit().first();
|
||||||
ok(wrapper instanceof _);
|
ok(wrapped instanceof _);
|
||||||
strictEqual(wrapper.value(), 1);
|
strictEqual(wrapped.value(), 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipTest(2);
|
skipTest(2);
|
||||||
@@ -17395,9 +17395,9 @@
|
|||||||
|
|
||||||
test('should track the `__chain__` value of a wrapper', 2, function() {
|
test('should track the `__chain__` value of a wrapper', 2, function() {
|
||||||
if (!isNpm) {
|
if (!isNpm) {
|
||||||
var wrapper = _([1, 2, 3]).chain().reverse().first();
|
var wrapped = _([1, 2, 3]).chain().reverse().first();
|
||||||
ok(wrapper instanceof _);
|
ok(wrapped instanceof _);
|
||||||
strictEqual(wrapper.value(), 3);
|
strictEqual(wrapped.value(), 3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipTest(2);
|
skipTest(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user