Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-04-14 14:15:41 +0300
committerGitHub <noreply@github.com>2020-04-14 14:15:41 +0300
commit88cc170908172f5e9f0b6ae0f4d8e698c7fdf8a4 (patch)
tree9a9bd07571f9be9a624d7c32d508385517c8f209 /lib
parent04a23431bfdb4d65468d503a1258134611482375 (diff)
Bump xo from 0.28.3 to 0.29.1 (#246)
* Bump xo from 0.28.3 to 0.29.1 Bumps [xo](https://github.com/xojs/xo) from 0.28.3 to 0.29.1. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.28.3...v0.29.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Fix the new lint errors Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/rfs.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rfs.js b/lib/rfs.js
index f51c917..d6e1eb3 100644
--- a/lib/rfs.js
+++ b/lib/rfs.js
@@ -25,9 +25,9 @@ module.exports = class {
if (typeof this.opts.baseValue !== 'number') {
if (this.opts.baseValue.endsWith('px')) {
- this.opts.baseValue = parseFloat(this.opts.baseValue);
+ this.opts.baseValue = Number.parseFloat(this.opts.baseValue);
} else if (this.opts.baseValue.endsWith('rem')) {
- this.opts.baseValue = parseFloat(this.opts.baseValue) / this.opts.remValue;
+ this.opts.baseValue = Number.parseFloat(this.opts.baseValue) / this.opts.remValue;
} else {
console.error(BASE_RFS_ERROR);
}
@@ -35,9 +35,9 @@ module.exports = class {
if (typeof this.opts.breakpoint !== 'number') {
if (this.opts.breakpoint.endsWith('px')) {
- this.opts.breakpoint = parseFloat(this.opts.breakpoint);
+ this.opts.breakpoint = Number.parseFloat(this.opts.breakpoint);
} else if (this.opts.breakpoint.endsWith('em')) {
- this.opts.breakpoint = parseFloat(this.opts.breakpoint) * this.opts.remValue;
+ this.opts.breakpoint = Number.parseFloat(this.opts.breakpoint) * this.opts.remValue;
} else {
console.error(BREAKPOINT_ERROR);
}
@@ -83,10 +83,10 @@ module.exports = class {
node.nodes.filter(node => node.type === 'word').forEach(node => {
node.value = node.value.replace(/^(-?\d*\.?\d+)(.*)/g, (match, value, unit) => {
- value = parseFloat(value);
+ value = Number.parseFloat(value);
// Return value if it's not a number or px/rem value
- if (isNaN(value) || !['px', 'rem'].includes(unit)) {
+ if (Number.isNaN(value) || !['px', 'rem'].includes(unit)) {
return match;
}