Skip to content

Commit

Permalink
[Refactor] add timeValue helper, use it
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 20, 2024
1 parent 2f17844 commit f0cddec
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 18 deletions.
4 changes: 2 additions & 2 deletions 2015/thisTimeValue.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

var $DateGetTime = require('call-bound')('Date.prototype.getTime');
var timeValue = require('../helpers/timeValue');

// https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object

module.exports = function thisTimeValue(value) {
return $DateGetTime(value);
return timeValue(value);
};
4 changes: 2 additions & 2 deletions 2016/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2017/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2018/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2019/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2020/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2021/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2022/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 2023/thisTimeValue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions helpers/timeValue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

var $DateGetTime = require('call-bound')('Date.prototype.getTime');

module.exports = function timeValue(x) {
return $DateGetTime(x);
};

0 comments on commit f0cddec

Please sign in to comment.