Skip to content

Tag: javascript

Disallow implicit accessing of window properties

I’m looking for an ESLint rule that disallows usage like location and only allows window.location. I’ve combed through the rules, but didn’t find one, does anyone know? Answer The no-restricted-globals rule will help you with this. Add this to your .eslintrc file So in the above example esli…

Create big json object js

I am using Nodejs to Create a JSON file from a really large JSON object (1GB). In order to avoid memory problems, I’m using createWriteStream : After using Builder(custom function ) it will return a big object JSON. the final step is to create this file : but unfortunately, JSON.stringify cannot be used…