New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

valentine

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valentine

JavaScripts sister.


Version published
Maintainers
1
Created
\  / _. |  _  ._ _|_ o ._   _
 \/ (_| | (/_ | | |_ | | | (/_

JavaScript's Sister, and protector. At 1.5k Valentine provides you with type checking, functional iterators, and basic utility helpers.

NPM users, install it:

$ npm install valentine

Use it:

var v = require('valentine');

v.map(['a', 'b', 'c'], function (letter) {
  return letter.toUpperCase();
}).join(' '); // => 'A B C'

API

iterators

  • v.each()
  • v.map()
  • v.every()
  • v.some()
  • v.filter()
  • v.indexOf()
  • v.lastIndexOf()
  • v.reduce()
  • v.reduceRight()

utility

  • v.pluck()
  • v.toArray()
  • v.size()
  • v.reject()
  • v.find()
  • v.compact()
  • v.flatten()
  • v.uniq()
  • v.first()
  • v.last()
  • v.keys()
  • v.trim()

type checking

  • v.is.fun()
  • v.is.str()
  • v.is.ele()
  • v.is.arr()
  • v.is.num()
  • v.is.bool()
  • v.is.args()
  • v.is.emp()
  • v.is.dat()
  • v.is.nan()
  • v.is.nil()
  • v.is.und()

Ender Support

Don't have Ender? Install it, and don't ever look back.

$ npm install ender -g

Then build valentine into your package

$ ender build valentine

Have an existing Ender package? Include it:

$ ender add valentine

Happy iterating!

FAQs

Package last updated on 06 Dec 2011

Did you know?

Socket

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.

Install

Related posts