Skip to content

Replace Number to Primordials - #30700

Closed
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:Number-enforce
Closed

Replace Number to Primordials#30700
Sebastien-Ahkrin wants to merge 1 commit into
nodejs:masterfrom
Sebastien-Ahkrin:Number-enforce

Conversation

@Sebastien-Ahkrin

Copy link
Copy Markdown
Contributor

Update some file to replace Number to the primordial Number.
And i just have created a line in "/lib/.eslintrc.yaml".

rules:
no-restricted-globals:
- name: Numbermessage: "Use `const { Number } = primordials;` instead of the global."

And replace every code :

const{
ArrayIsArray,
MathMax,
ObjectCreate,
ObjectKeys,}=primordials;

By

const{
ArrayIsArray,
MathMax,
ObjectCreate,
ObjectKeys,
Number,}=primordials;

in theses files :

  • lib/internal/buffer.js
  • lib/internal/console/constructor.js
  • lib/internal/fs/utils.js
  • lib/internal/http2/util.js
  • lib/internal/repl.js
  • lib/internal/url.js
  • lib/internal/util/inspect.js
  • lib/net.js

This task was given to me by @targos thanks ❤️

I hope this PR will help you :x

@nodejs-github-botnodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Nov 28, 2019
@Sebastien-AhkrinSebastien-Ahkrin changed the title Number enforceReplace Number to PrimordialsNov 28, 2019
Comment threadlib/internal/http2/util.js Outdated
@targos

Copy link
Copy Markdown
Member

Refs: #30697

Should land after #30686

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

targos pushed a commit that referenced this pull request Nov 30, 2019
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@targos

Copy link
Copy Markdown
Member

Landed in 2070d3f. Thanks for the PR!

@targostargos closed this Nov 30, 2019
@ghost

This comment has been minimized.

targos pushed a commit that referenced this pull request Dec 1, 2019
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BridgeARBridgeAR mentioned this pull request Dec 3, 2019
targos pushed a commit that referenced this pull request Jan 14, 2020
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@targostargos mentioned this pull request Jan 15, 2020
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
PR-URL: #30700
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Feb 8, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / srcIssues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Sebastien-Ahkrin@targos@nodejs-github-bot@cjihrig@trivikr