Skip to content

Commit

Permalink
docs: fix typos (#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioness100 authored Feb 19, 2023
1 parent 35cd63b commit 5d77110
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
34 changes: 17 additions & 17 deletions ORIGINAL_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2154,14 +2154,14 @@ Modules [`esnext.iterator.constructor`](https://github.com/zloirock/core-js/blob
class Iterator {
static from(iterable: Iterable<any> | Iterator<any>): Iterator<any>;
drop(limit: uint): Iterator<any>;
every(callbackfn: (value: any, couner: uint) => boolean): boolean;
filter(callbackfn: (value: any, couner: uint) => boolean): Iterator<any>;
find(callbackfn: (value: any, couner: uint) => boolean)): any;
flatMap(callbackfn: (value: any, couner: uint) => Iterable<any> | Iterator<any>): Iterator<any>;
forEach(callbackfn: (value: any, couner: uint) => void): void;
map(callbackfn: (value: any, couner: uint) => any): Iterator<any>;
reduce(callbackfn: (memo: any, value: any, couner: uint) => any, initialValue: any): any;
some(callbackfn: (value: any, couner: uint) => boolean): boolean;
every(callbackfn: (value: any, counter: uint) => boolean): boolean;
filter(callbackfn: (value: any, counter: uint) => boolean): Iterator<any>;
find(callbackfn: (value: any, counter: uint) => boolean)): any;
flatMap(callbackfn: (value: any, counter: uint) => Iterable<any> | Iterator<any>): Iterator<any>;
forEach(callbackfn: (value: any, counter: uint) => void): void;
map(callbackfn: (value: any, counter: uint) => any): Iterator<any>;
reduce(callbackfn: (memo: any, value: any, counter: uint) => any, initialValue: any): any;
some(callbackfn: (value: any, counter: uint) => boolean): boolean;
take(limit: uint): Iterator<any>;
toArray(): Array<any>;
@@toStringTag: 'Iterator'
Expand Down Expand Up @@ -2418,14 +2418,14 @@ class Iterator {
class AsyncIterator {
static from(iterable: AsyncIterable<any> | Iterable<any> | AsyncIterator<any>): AsyncIterator<any>;
drop(limit: uint): AsyncIterator<any>;
every(async callbackfn: (value: any, couner: uint) => boolean): Promise<boolean>;
filter(async callbackfn: (value: any, couner: uint) => boolean): AsyncIterator<any>;
find(async callbackfn: (value: any, couner: uint) => boolean)): Promise<any>;
flatMap(async callbackfn: (value: any, couner: uint) => AsyncIterable<any> | Iterable<any> | AsyncIterator<any>): AsyncIterator<any>;
forEach(async callbackfn: (value: any, couner: uint) => void): Promise<void>;
map(async callbackfn: (value: any, couner: uint) => any): AsyncIterator<any>;
reduce(async callbackfn: (memo: any, value: any, couner: uint) => any, initialValue: any): Promise<any>;
some(async callbackfn: (value: any, couner: uint) => boolean): Promise<boolean>;
every(async callbackfn: (value: any, counter: uint) => boolean): Promise<boolean>;
filter(async callbackfn: (value: any, counter: uint) => boolean): AsyncIterator<any>;
find(async callbackfn: (value: any, counter: uint) => boolean)): Promise<any>;
flatMap(async callbackfn: (value: any, counter: uint) => AsyncIterable<any> | Iterable<any> | AsyncIterator<any>): AsyncIterator<any>;
forEach(async callbackfn: (value: any, counter: uint) => void): Promise<void>;
map(async callbackfn: (value: any, counter: uint) => any): AsyncIterator<any>;
reduce(async callbackfn: (memo: any, value: any, counter: uint) => any, initialValue: any): Promise<any>;
some(async callbackfn: (value: any, counter: uint) => boolean): Promise<boolean>;
take(limit: uint): AsyncIterator<any>;
toArray(): Promise<Array>;
@@toStringTag: 'AsyncIterator'
Expand Down Expand Up @@ -2618,7 +2618,7 @@ class Observable {
constructor(subscriber: Function): Observable;
subscribe(observer: Function | { next?: Function, error?: Function, complete?: Function }): Subscription;
@@observable(): this;
static of(...items: Aray<mixed>): Observable;
static of(...items: Array<mixed>): Observable;
static from(x: Observable | Iterable): Observable;
static readonly attribute @@species: this;
}
Expand Down
10 changes: 5 additions & 5 deletions deno/corejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4843,15 +4843,15 @@ var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {
// eslint-disable-next-line es/no-typed-arrays -- required for testing
var array = new Uint8ClampedArray(2);
call($set, array, { length: 1, 0: 3 }, 1);
return array[1] !== 3;
});

// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
var array = new Int8Array(2);
array.set(1);
array.set('2', 1);
Expand All @@ -4864,13 +4864,13 @@ exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
aTypedArray(this);
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
var src = toIndexedObject(arrayLike);
if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
var length = this.length;
var len = lengthOfArrayLike(src);
var index = 0;
if (len + offset > length) throw RangeError('Wrong length');
while (index < len) this[offset + index] = src[index++];
}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);


/***/ }),
Expand Down Expand Up @@ -7187,7 +7187,7 @@ var $RangeError = RangeError;
var $TypeError = TypeError;

var $RangeIterator = createIteratorConstructor(function NumericRangeIterator(start, end, option, type, zero, one) {
// TODO: Drop the first `typeof` check after removing lagacy methods in `core-js@4`
// TODO: Drop the first `typeof` check after removing legacy methods in `core-js@4`
if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) {
throw $TypeError(INCORRECT_RANGE);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js-pure/override/internals/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = function (options, source) {

// bind methods to global for calling from export context
if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
// wrap global constructors for prevent changs in this version
// wrap global constructors for prevent changes in this version
else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
// make static versions for prototype methods
else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);
Expand Down
2 changes: 1 addition & 1 deletion packages/core-js/internals/numeric-range-iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var $RangeError = RangeError;
var $TypeError = TypeError;

var $RangeIterator = createIteratorConstructor(function NumericRangeIterator(start, end, option, type, zero, one) {
// TODO: Drop the first `typeof` check after removing lagacy methods in `core-js@4`
// TODO: Drop the first `typeof` check after removing legacy methods in `core-js@4`
if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) {
throw $TypeError(INCORRECT_RANGE);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/core-js/modules/es.typed-array.set.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () {
// eslint-disable-next-line es/no-typed-arrays -- required for testing
var array = new Uint8ClampedArray(2);
call($set, array, { length: 1, 0: 3 }, 1);
return array[1] !== 3;
});

// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
var array = new Int8Array(2);
array.set(1);
array.set('2', 1);
Expand All @@ -35,10 +35,10 @@ exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
aTypedArray(this);
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
var src = toIndexedObject(arrayLike);
if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
var length = this.length;
var len = lengthOfArrayLike(src);
var index = 0;
if (len + offset > length) throw RangeError('Wrong length');
while (index < len) this[offset + index] = src[index++];
}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
}, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);

0 comments on commit 5d77110

Please sign in to comment.