
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@dwmkerr/node-utils
Advanced tools
Basic Node.js utility functions. Complements the standard library, no dependencies.
Basic Node.js utility functions. Complements the standard library, no dependencies.
Basic utility functions which complement the standard library. Mostly used in my own projects.
Install with:
npm install -g @dwmkerr/node-utils
Then important use functions as needed.
import { deleteIfExists } = require('@dwmkerr/node-utils');
The only dependencies are Node LTS (or above).
Useful commands for development are:
Command | Usage |
---|---|
npm test | Runs the unit tests. |
npm run test:debug | Runs the tests in a debugger. Combine with .only and debugger for ease of debugging. |
npm run cov | Runs the tests, writing coverage reports to ./artifacts/coverage . |
Currently the linting style is based on airbnb. Run npm run lint
to lint the code.
Install the dependencies (I recommend Node Version Manager):
nvm install --lts
nvm use --lts
git clone git@github.com:dwmkerr/node-utils.git
cd node-utils
npm install && npm test
Run the tests with:
npm test
Tests are executed with Mocha and coverage is handled by Istanbul. Coverage reports are written to an ./artifacts
folder.
Note that best practices are to pass Mocha a quoted string with a glob pattern for cross-platform execution of tests (see Mocha Docs). However for some reason on AppVeyor this doesn't seem to work. Leaving the pattern unquoted works for cmd
as well as the shell in builds for now. So please be careful if changing the quotes and test on both platforms.
Conventional Commits should be used. This allows the CHANGELOG to be kept up to date automatically, and ensures that semantic versioning can be expected from the library.
To create a release.
npm run release
.git push --tags && git push && npm publish
Note that semantic-version
is used, meaning a changelog is automatically kept up to date, and versioning is handled semantically based on the commit message.
Builds are run on CircleCI. You can run the CircleCI build locally with the following command:
make circleci
FAQs
Basic Node.js utility functions. Complements the standard library, no dependencies.
The npm package @dwmkerr/node-utils receives a total of 3 weekly downloads. As such, @dwmkerr/node-utils popularity was classified as not popular.
We found that @dwmkerr/node-utils 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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.