
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
arrayiffy-if-string
Advanced tools
Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
The latest version is ESM only: Node 12+ is needed to use it and it must be import
ed instead of require
d. If your project is not on ESM yet and you want to use require
, use an older version of this program, 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 (c) 2010-2022 Roy Revelt and other contributors
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 24,600 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 0 open source maintainers 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.