
Research
/Security News
Malicious Chrome and Firefox Extensions Steal Crypto Traders’ Session and Wallet Data
Malicious Chrome and Firefox extensions target Axiom Trade and Padre users, stealing session tokens and wallet data.
@isoftdata/utility-string
Advanced tools

pluralIfNeeded(number[, pluralSuffix, singleSuffix])
Type: number
Type: string
Default: 's'
Type: string
Default: ''(empty string)
Returnsstring
//Simple Example
const inventoryList = [ { inventoryId: 1 }, { inventoryId: 2 } ]
`You have ${inventoryList.length} item${pluralIfNeeded(inventoryList.length)} in inventory` // 'You have 2 items in inventory'
//Example with custom plural suffix and single suffix
const daytonOxenCount = 0
const billOxenCount = 1
const tedOxenCount = 2
`Dayton has ${daytonOxenCount} ox${pluralIfNeeded(daytonOxenCount, 'en')}` // 'Dayton has 0 oxen'
`Bill has ${billOxenCount} ox${pluralIfNeeded(billOxenCount, 'en')}` // 'Bill has 1 ox'
`Ted has ${tedOxenCount} ox${pluralIfNeeded(tedOxenCount, 'en')}` // 'Ted has 2 oxen'
//Another example with custom plural suffix and single suffix
const daytonCactusCount = 0
const billCactusCount = 1
const tedCactusCount = 2
`Dayton has ${daytonCactusCount} cact${pluralIfNeeded(daytonCactusCount, 'i', 'us')}` // 'Dayton has 0 cactus'
`Bill has ${billCactusCount} cact${pluralIfNeeded(billCactusCount, 'i', 'us')}` // 'Bill has 1 cacti'
`Ted has ${tedCactusCount} cact${pluralIfNeeded(tedCactusCount, 'i', 'us')}` // 'Ted has 2 cactus'
stringToBoolean(string)
Type: string
Returnsboolean
const inventoryItem = { inventoryId: 1, usesCost: 'True' }
stringToBoolean(inventoryItem.usesCost) // true
booleanToYesNo(boolean)
Type: boolean
Returnsstring
booleanToYesNo(true) // 'Yes'
booleanToYesNo(false) // 'No'
FAQs
Unknown package
The npm package @isoftdata/utility-string receives a total of 55 weekly downloads. As such, @isoftdata/utility-string popularity was classified as not popular.
We found that @isoftdata/utility-string demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.

Research
/Security News
Malicious Chrome and Firefox extensions target Axiom Trade and Padre users, stealing session tokens and wallet data.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.