Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
compound-subject
Advanced tools
A tiny JavaScript library for converting arrays of strings to compound subjects
A tiny JavaScript library for converting arrays of strings to compound subjects
In your project directory:
npm install --save compound-subject
At the top of your module:
var compoundSubject = require('compound-subject');
In your project directory:
bower install --save compound-subject
In your HTML:
<script src="bower_components/compound-subject/compound-subject.min.js"></script>
Or if you want the dev version:
<script src="bower_components/compound-subject/compound-subject.js"></script>
compoundSubject
will be defined in the global scope (i.e. window
).
compoundSubject(['apple', 'banana', 'cherry']).make();
// 'apple, banana and cherry'
compoundSubject(['apple', 'banana', 'cherry'])
.endWith('or')
.make();
// 'apple, banana or cherry'
compoundSubject(['apple', 'banana', 'cherry'])
.delimitAll()
.endWith('and maybe')
.make();
// 'apple, banana, and maybe cherry'
compoundSubject([
'a very crunchy Honeycrisp apple',
'bananas at the pinnacle of ripeness',
'delectable halved Rainier cherries'
]).delimitWith(';')
.delimitAll()
.make();
// 'a very crunchy Honeycrisp apple; bananas at the pinnacle of ripeness; and delectable halved Rainier cherries'
FAQs
A tiny JavaScript library for converting arrays of strings to compound subjects
The npm package compound-subject receives a total of 16,581 weekly downloads. As such, compound-subject popularity was classified as popular.
We found that compound-subject 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.