question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

REPL: remove parts of the url that are falsy/empty since unncessary

See original GitHub issue

So for a url like

https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=IZA&debug=false&circleciRepo=&evaluate=false&lineWrap=true&presets=es2015-loose&targets=&version=7.0.0-beta.0

Some of the fields that are either &key= or &key=false can be removed and it should work the same? babili=false&browsers=&build=&builtIns=false&debug=false&circleciRepo=&evaluate=false&targets=

This is because we don’t have default true/false so not setting false should be ok. Basically then we can have a shorter url

(unless we create a button somewhere to shorten the url or something)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Daniel15commented, Oct 5, 2017

Instead of stripping false, we should strip params that have the default value. It’s possible we already have params that default to true, or might in the future.

0reactions
bvaughncommented, Oct 27, 2017

Some of the fields that are either &key= or &key=false can be removed and it should work the same?

This is because we don’t have default true/false so not setting false should be ok. Basically then we can have a shorter url

I have concerns about this proposed change, as mentioned in this comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove blank attributes from an Object in Javascript
This function uses recursion to remove items from nested objects. ... Filter all falsy values ( "" , 0 , false , null...
Read more >
How To Remove Unwanted Parts From Strings in Pandas
Removing discarding unwanted parts from strings in pandas dataframe columns using replace(), split() string methods and regular expressions ...
Read more >
How To Remove Characters from a String in Python
Remove Characters From a String Using the replace() Method. The String replace() method replaces a character with a new character. You can  ......
Read more >
The Double-Bang (!!) Operator And A Misunderstanding Of ...
And, since the an empty String is inherently a Falsy value and the OR. // operator also deals with Truthy / Falsy values,...
Read more >
URL | Node.js v19.3.0 Documentation
Constructing a URL from component parts and getting the constructed string ... Thus, unlike legacy urlObject s, using the delete keyword on any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found