Skip to content

Commit

Permalink
Rename ValidPropertyBag to ToPartialRecord.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Apr 1, 2020
1 parent 894e54b commit 8af06da
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion polyfill/lib/date.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class Date {
with(temporalDateLike = {}, options) {
if (!ES.IsTemporalDate(this)) throw new TypeError('invalid receiver');
const disambiguation = ES.ToTemporalDisambiguation(options);
const props = ES.ValidPropertyBag(temporalDateLike, ['year', 'month', 'day']);
const props = ES.ToPartialRecord(temporalDateLike, ['year', 'month', 'day']);
if (!props) {
throw new RangeError('invalid date-like');
}
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/datetime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DateTime {
with(temporalDateTimeLike, options) {
if (!ES.IsTemporalDateTime(this)) throw new TypeError('invalid receiver');
const disambiguation = ES.ToTemporalDisambiguation(options);
const props = ES.ValidPropertyBag(temporalDateTimeLike, [
const props = ES.ToPartialRecord(temporalDateTimeLike, [
'year',
'month',
'day',
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/ecmascript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export const ES = ObjectAssign({}, ES2019, {
GetIntrinsic: (intrinsic) => {
return intrinsic in INTRINSICS ? INTRINSICS[intrinsic] : GetIntrinsic(intrinsic);
},
ValidPropertyBag: (bag, anyof = []) => {
ToPartialRecord: (bag, anyof = []) => {
if (!bag || 'object' !== typeof bag) return false;
let any;
for (let prop of anyof) {
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/monthday.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class MonthDay {
with(temporalMonthDayLike, options) {
if (!ES.IsTemporalMonthDay(this)) throw new TypeError('invalid receiver');
const disambiguation = ES.ToTemporalDisambiguation(options);
const props = ES.ValidPropertyBag(temporalMonthDayLike, ['month', 'day']);
const props = ES.ToPartialRecord(temporalMonthDayLike, ['month', 'day']);
if (!props) {
throw new RangeError('invalid month-day-like');
}
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/time.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Time {
with(temporalTimeLike = {}, options) {
if (!ES.IsTemporalTime(this)) throw new TypeError('invalid receiver');
const disambiguation = ES.ToTemporalDisambiguation(options);
const props = ES.ValidPropertyBag(temporalTimeLike, [
const props = ES.ToPartialRecord(temporalTimeLike, [
'hour',
'minute',
'second',
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/yearmonth.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class YearMonth {
with(temporalYearMonthLike = {}, options) {
if (!ES.IsTemporalYearMonth(this)) throw new TypeError('invalid receiver');
const disambiguation = ES.ToTemporalDisambiguation(options);
const props = ES.ValidPropertyBag(temporalYearMonthLike, ['year', 'month']);
const props = ES.ToPartialRecord(temporalYearMonthLike, ['year', 'month']);
if (!props) {
throw new RangeError('invalid year-month-like');
}
Expand Down

0 comments on commit 8af06da

Please sign in to comment.