4.17.10 • Published 6 years ago

virtual-lodash v4.17.10

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

virtual-lodash

npm version travis ci status

Wrapper functions for Lodash that can be used as virtual methods with es6 bind operator.

import {camelCase} from 'virtual-lodash';
// or
import camelCase from 'virtual-lodash/camelCase';

'FOO_BAR'::camelCase(); // → 'fooBar'

Performance

Implementation of wrapper functions is performance oriented and uses arguments only if wrapped Lodash method does so.

For example, here is a wrapper function for cloneWith that has fixed arity:

var _cloneWith = require('lodash/cloneWith');

module.exports = function cloneWith(customizer) {
  'use strict';
  return _cloneWith(this, customizer);
};

On the other hand, union method uses arguments object and so does corresponding wrapper:

var _union = require('lodash/union');

module.exports = function union() {
  'use strict';
  var length = arguments.length;
  var args = Array(length + 1);
  args[0] = this;
  for (var i = 0; i < length; ++i) {
    args[i + 1] = arguments[i];
  }
  return _union.apply(void 0, args);
};

Versions

virtual-lodash has same versioning as Lodash itself, so virtual-lodash@4.17.2 uses lodash@4.17.2 under the hood. Project is automatically rebuild on the same day when new Lodash update arrives.

License

The code is available under MIT licence.

4.17.10

6 years ago

4.17.5

6 years ago

4.17.4-fix.2

7 years ago

4.17.4-fix.1

7 years ago

4.17.3

7 years ago

4.17.0-test

7 years ago

4.17.0

7 years ago

4.17.4-19

7 years ago

4.17.4-18

7 years ago

4.17.4-17

7 years ago

4.17.4-15

7 years ago

4.17.4

7 years ago

0.0.1

7 years ago