diff options
Diffstat (limited to 'node_modules/date-fns/secondsToMilliseconds/index.js')
| -rw-r--r-- | node_modules/date-fns/secondsToMilliseconds/index.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/node_modules/date-fns/secondsToMilliseconds/index.js b/node_modules/date-fns/secondsToMilliseconds/index.js new file mode 100644 index 0000000..d78ef57 --- /dev/null +++ b/node_modules/date-fns/secondsToMilliseconds/index.js @@ -0,0 +1,32 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = secondsToMilliseconds; +var _index = _interopRequireDefault(require("../_lib/requiredArgs/index.js")); +var _index2 = require("../constants/index.js"); +/** + * @name secondsToMilliseconds + * @category Conversion Helpers + * @summary Convert seconds to milliseconds. + * + * @description + * Convert a number of seconds to a full number of milliseconds. + * + * @param {number} seconds - number of seconds to be converted + * + * @returns {number} the number of seconds converted in milliseconds + * @throws {TypeError} 1 argument required + * + * @example + * // Convert 2 seconds into milliseconds + * const result = secondsToMilliseconds(2) + * //=> 2000 + */ +function secondsToMilliseconds(seconds) { + (0, _index.default)(1, arguments); + return seconds * _index2.millisecondsInSecond; +} +module.exports = exports.default;
\ No newline at end of file |
