
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@stdlib/assert-is-string-array
Advanced tools
Test if a value is an array of strings.
npm install @stdlib/assert-is-string-array
var isStringArray = require( '@stdlib/assert-is-string-array' );
Tests if a value
is an array of strings.
var bool = isStringArray( [ 'beep', new String('boop') ] );
// returns true
bool = isStringArray( [ 'beep', null ] );
// returns false
Tests if a value
is an array
containing only string
primitives.
var bool = isStringArray.primitives( [ 'beep', 'boop' ] );
// returns true
bool = isStringArray.primitives( [ 'beep', new String('boop') ] );
// returns false
Tests if a value
is an array
containing only String
objects.
var bool = isStringArray.objects( [ new String('beep'), new String('boop') ] );
// returns true
bool = isStringArray.objects( [ 'beep', new String('boop') ] );
// returns false
var isStringArray = require( '@stdlib/assert-is-string-array' );
var bool = isStringArray( [ 'Hello World!' ] );
// returns true
bool = isStringArray( [ 'a', 'b', 'c' ] );
// returns true
bool = isStringArray( [ new String( 'abc' ), 'def', 'ghi' ] );
// returns true
bool = isStringArray( 'abc' );
// returns false
bool = isStringArray( [] );
// returns false
bool = isStringArray( [ 'a', NaN ] );
// returns false
@stdlib/assert/is-array
: test if a value is an array.@stdlib/assert/is-string
: test if a value is a string.This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2022. The Stdlib Authors.
0.0.7 (2022-02-16)
No changes reported for this release.
</section> <!-- /.release --> <section class="release" id="v0.0.6">FAQs
Test if a value is an array of strings.
The npm package @stdlib/assert-is-string-array receives a total of 3,180 weekly downloads. As such, @stdlib/assert-is-string-array popularity was classified as popular.
We found that @stdlib/assert-is-string-array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.