Sha256: 137b337aacb805971db66342264e1c464df2174584f23c953aecbb86b0e516e2
Contents?: true
Size: 736 Bytes
Versions: 6
Compression:
Stored size: 736 Bytes
Contents
define([ 'lodash-src' ], function (_) { 'use strict'; /* Mixins :) */ _.mixin({ move: function (array, fromIndex, toIndex) { array.splice(toIndex, 0, array.splice(fromIndex, 1)[0] ); return array; }, remove: function (array, index) { array.splice(index, 1); return array; }, // If variable is value, then return alt. If variable is anything else, return value; toggle: function (variable, value, alt) { return variable === value ? alt : value; }, toggleInOut: function(array,value) { if(_.contains(array,value)) { array = _.without(array,value); } else { array.push(value); } return array; } }); return _; });
Version data entries
6 entries across 6 versions & 1 rubygems