Partial Matching in Jest

1 year ago

Jest has the ability to check for partial matches on arrays and objects. Let us see how to do partial…

JSON.parse(): Fixing ‘SyntaxError: “[object Object]” is not valid JSON’

1 year ago

SyntaxError: "[object Object]" is not valid JSON: usually happens when the value being passed to JSON.parse is not a string…

Fixing “error: cannot find module semver” error in Node.js

1 year ago

When installing a package using npm, you might encounter the "error: cannot find module semver" error. + npm install ...…

Fix “Error:0308010C:digital envelope routines::unsupportedFixing” in Node.js

1 year ago

Node 17 introduced OpenSSL v3.0, which brought in some breaking changes, and the "Error: error:0308010C:digital envelope routines::unsupported" is a result…

Fixing “node: –openssl-legacy-provider is not allowed in node_options” error

1 year ago

I recently ran into the "node: --openssl-legacy-provider is not allowed in node_options" error while working with Node 17. It occurs…

JavaScript: fix “SyntaxError: cannot use import statement outside a module”

1 year ago

I recently was working with a third-party library. I ran into the error "Uncaught SyntaxError: cannot use import statement outside…

How to reload zsh configuration

1 year ago

I have been using zsh for quite some time now and learned something new while setting up some commands today.…

How to sort a Set in JavaScript

2 years ago

ES6 introduced the set data structure in JavaScript. But sets are not ordered abstract data structures. So there is no…

Debugging CSS scroll using one simple style

2 years ago

I have been doing a lot of complicated front-end work off lately and that always brings me back to the…

CSS :has a parent selector now

2 years ago

CSS now includes a :has selector that allows us to apply styles on the basis of what is happening inside…

Advertisements