Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A set of Javascript utilities for building Node and browser apps.
The idea was to take all those small thing I'm always rewriting on every project and move them to a single package so I can not only stop copying & pasting them all over the place but also maintain them all together.
There are two rules I followed when I had to decide what to put and what to keep somewhere else:
- | - |
---|---|
Package | wootils |
Description | A set of Javascript utilities for building Node and browser apps. |
Node Version | >= v8.0.0 |
The package is divided on 3 folders:
node
: Utilities that are only compatible with Node.shared
: Utilities that can work on both browser and Node.browser
: Utilities that can only be used while on a browser.Two notes about the Node utilities:
This is a service to manage applications configurations. It takes care of loading, activating, switching and merging configuration files.
Read more about AppConfiguration
A really small service to centralize the place where you read environment variables and check if you are running on development or production.
Read more about EnvironmentUtils
Listens for uncaught exceptions and unhandled promises rejections, and logs them out with full detail.
The name leaves nothing to the imagination. As you may have guessed, this is service for logging messages into the console.
A tiny function that reads the contents of the app package.json
. This is really useful on an Jimple application where you can register it, because the returned value gets cached and it's available as a service.
An easy way to manage locations and build paths relative to those locations on a Node app.
Is basically require
but the path is relative to the project root directory.
A really basic client to work with an API endpoints requests.
Create a deferred promise using the native Promise
object.
A small implementation of a pubsub service for handling events on an app.
A way to extend promise chains by injecting custom properties.
A small collection of utility methods to work with objects.
An abstract class allows you to build services that relay on browser storage (session/local) and simplifies the way you work it.
Before doing anything, install the repository hooks:
# You can either use npm or yarn, it doesn't matter
yarn run hooks
Task | Description |
---|---|
yarn run hooks | Install the GIT repository hooks. |
yarn test | Run the project unit tests. |
yarn run lint | Lint the modified files. |
yarn run lint:full | Lint the project code. |
yarn run docs | Generate the project documentation. |
yarn run todo | List all the pending to-do's. |
I use Jest with Jest-Ex to test the project. The configuration file is on ./.jestrc
, the tests and mocks are on ./tests
and the script that runs it is on ./utils/scripts/test
.
I use ESlint to validate all our JS code. The configuration file for the project code is on ./.eslintrc
and for the tests on ./tests/.eslintrc
(which inherits from the one on the root), there's also an ./.eslintignore
to ignore some files on the process, and the script that runs it is on ./utils/scripts/lint
.
I use ESDoc to generate HTML documentation for the project. The configuration file is on ./.esdocrc
and the script that runs it is on ./utils/scripts/docs
.
I use @todo
comments to write all the pending improvements and fixes, and Leasot to generate a report. The script that runs it is on ./utils/scripts/todo
.
You can work with this project on Windows, but it only works if you use Yarn. The reason is that NPM on Windows doesn't allow you to use paths like ./scripts/something
on the package.json
scripts, while Yarn does.
Another alternative if you are using Windows is to use WSL.
FAQs
A set of Javascript utilities for building Node and browser apps.
The npm package wootils receives a total of 101 weekly downloads. As such, wootils popularity was classified as not popular.
We found that wootils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.