Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
arrayiffy-if-string
Advanced tools
Readme
Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
This package is pure ESM. If you're not ready yet, install an older version of this program, 3.14.0 (npm i arrayiffy-if-string@3.14.0
).
npm i arrayiffy-if-string
import { strict as assert } from "assert";
import { arrayiffy } from "arrayiffy-if-string";
assert.deepEqual(arrayiffy("aaa"), ["aaa"]);
assert.deepEqual(arrayiffy(""), []);
assert.equal(arrayiffy(true), true);
assert.equal(arrayiffy(), undefined);
Please visit codsen.com for a full description of the API.
To report bugs or request features or assistance, raise an issue on GitHub.
MIT License.
Copyright © 2010-2022 Roy Revelt and other contributors.
Thanks to KRyan for types https://stackoverflow.com/a/71834598/3943954
FAQs
Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
The npm package arrayiffy-if-string receives a total of 12,692 weekly downloads. As such, arrayiffy-if-string popularity was classified as popular.
We found that arrayiffy-if-string demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.