0.4.0-draft-4 • Published 8 years ago

lowerdash v0.4.0-draft-4

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

lowerdash - ES6

My mixins for Lodash, formerly known as hidash.

Now available as ES6 style module and use lodash as peerDependency

Lowerdash provides the following methods:

Function

straitjacket (fn Function, Mixed defaultValue)

Returns a new function that tries to invoke passed fn and return defaultValue otherwise.

import closest from 'lowerdash/utility/straitjacket';

var straitjacketed = straitjacket(function(){
	return undefinedValue;
}, 'Not found');

straitjacketed();
// -> 'Not found'

Array

closest

Compares passed value to passed array values and return the closest.

import closest from 'lowerdash/array/closest';
closest([0, 10, 20, 30, 40], 6);
// -> 10

arry (any Mixed)

Returns an array from any array-like. If passed any is not array-like, returns a new array containing the any element.

import arry from 'lowerdash/array/arry';
arry([1, 2, 3]);
// -> [1, 2, 3]

arry(1);
// -> [1]

function(a, b, c){
	return arry(arguments);
	// -> [a, b, c]
}

insertAt

gluten

penultimate

replaceAt

Object

keyOf

norris

Array & Object

Painless async series without promise.

eachAsync

eachDelayed

eachParallel

Deeper

Set/get/erase Object properties from path

getFromPath

setFromPath

eraseFromPath

Usage

Node environment

npm install lowerdash

Then in your scripts:

// require lowerdash
var _ = require('lowerdash');

// or require lowerdashed lodash
var _ = require('lodash');

Browser environment

bower install lowerdash

Then include these files into your documents

<script src="bower_components/lowerdash/dist/lowerdash.js"></script>
<script src="bower_components/lodash/dist/lodash.js"></script>
0.4.0-draft-4

8 years ago

0.4.0-draft-3

9 years ago

0.4.0-draft-2

9 years ago

0.4.0-draft-1

9 years ago

0.4.0-draft

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago