Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
\ / _. | _ ._ _|_ o ._ _
\/ (_| | (/_ | | |_ | | | (/_
JavaScript's Sister, and protector — providing you with type checking, functional iterators, and common utility helpers; utilizing native JavaScript methods (when available) for optimal speed.
Browser usage:
<script src="valentine.js"></script>
<script>
v.forEach(['a', 'b', 'c'], function (letter) {
})
</script>
Node users, install it:
$ npm install valentine
Use it:
var v = require('valentine');
// showcase object style
v(['a', 'b', 'c']).map(function (letter) {
return letter.toUpperCase();
}).join(' '); // => 'A B C'
v.parallel(
function (fn) {
getTimeline(function (e, timeline) {
fn(e, timeline)
})
}
, function (fn) {
getUser(function (e, user) {
fn(e, user)
})
}
, function (e, timeline, user) {
if (e) return console.log(e)
ok(timeline == 'one', 'first result is "one"')
ok(user == 'two', 'second result is "two"')
}
)
v.waterfall(
function (callback) {
callback(null, 'one', 'two')
}
, function (a, b, callback) {
console.log(a == 'one')
console.log(b == 'two')
callback(null, 'three')
}
, function (c, callback) {
console.log(c == 'three')
callback(null, 'final result')
}
, function (err, result) {
console.log(!!err == false)
console.log(result == 'final result')
}
)
v(['a', 'b', 'c']).map(function (letter) {
return letter.toUpperCase()
}); // => ['A', 'B', 'C']
v(['a', 'b', [['c']], 0, false,,,null,['a', 'b', 'c']])
.chain().flatten().compact().uniq().map(function (letter) {
return letter.toUpperCase()
}).value(); // => ['A', 'B', 'C']
Don't have Ender? Install it, and don't ever look back.
$ [sudo] npm install ender -g
Then build valentine into your package
$ ender build valentine
Have an existing Ender package? Include it:
$ ender add valentine
Write code like a boss
// as a top level method
$.v(['a', ['virus'], 'b', 'c']).reject(function (el, i) {
return $.is.arr(el[i])
})
// top level methods in bridge
$.each
map
merge
extend
toArray
keys
values
trim
bind
parallel
waterfall
inArray
Or just require the valentine module
!function (v) {
v(['a', ['virus'], 'b', 'c']).reject(function (el, i) {
return v.is.arr(el[i])
})
}(require('valentine'))
Care to contribute? Make your edits to src/valentine.js
and get your environment up and running
$ npm install --dev
$ make
$ make test
$ open tests/index.html
Happy iterating!
FAQs
JavaScript’s Functional Sister. Utilitiy, Iterators, type checking
The npm package valentine receives a total of 16 weekly downloads. As such, valentine popularity was classified as not popular.
We found that valentine 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.