Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including wink-helpers with all npm packages installed. Try it out:

// Load wink helpers var helpers = require( 'wink-helpers' ); /* Use array helpers */ console.log( helpers.array.isArray( [] ) ); // -> true var ppl = [ { name: 'aiden', age: 42 }, { name: 'olivia', age: 37 } ]; console.log( ppl.sort( helpers.array.ascendingOn( 'age' ) ) ); // -> [ { "name": "olivia", "age": 37 }, { "name": "aiden", "age": 42 } ] console.log( helpers.array.product( [ [ 9, 8 ], [ 1, 2 ] ] ) ); // -> [ [ 9, 1 ], [ 9, 2 ], [ 8, 1 ], [ 8, 2 ] ] /* Use object helpers */ console.log( helpers.object.isObject( {} ) ); // -> true console.log( helpers.object.isObject( new Set() ) ); // -> false console.log( helpers.object.table( { mobile: 33, chargers: 45, usb: 27 } ) ); // -> [ [ "mobile", 33 ], [ "chargers", 45 ], [ "usb", 27 ] ]

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

wink-helpers v2.0.0

Functions for cross validation, shuffle, cartesian product and more

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free