Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Last active July 4, 2019 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbvf50mobile/b5aa20c6fe64625aef6f112a81a8306b to your computer and use it in GitHub Desktop.
Save lbvf50mobile/b5aa20c6fe64625aef6f112a81a8306b to your computer and use it in GitHub Desktop.
for @AndreyBerezhnoy solution for Twitter pagination
// https://v8.dev/features/bigint
BigInt(BigInt( "1062462935174393900") - BigInt(1)).toString() // "1062462935174393899"
Number.MAX_SAFE_INTEGER < BigInt( "1062462935174393900") // ture
BigInt( "1062462935174393900") > Number.MAX_SAFE_INTEGER
BigInt( "1062462935174393900") - BigInt(Number.MAX_SAFE_INTEGER) // 1053455735919652909n
@lbvf50mobile
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment