Skip to content

Instantly share code, notes, and snippets.

@kfly8
Last active May 14, 2018 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfly8/f4ceee9fe6ddddf1ab601ed2a71da367 to your computer and use it in GitHub Desktop.
Save kfly8/f4ceee9fe6ddddf1ab601ed2a71da367 to your computer and use it in GitHub Desktop.
Lodash.pm export design

general case

use Lodash;
# => export `_`

_->add(1,2) # => 3
_(list)->chain->head->value

_->each([1, 2,3], _->can('add'))

export functions

use Lodash qw(_add);
# => export `_add`

_add(1,2) # => 3

export category functions

use Lodash qw(:core);
# => export *core* lodash functions;

# or
use Lodash -core;

export all functions

use Lodash -all;
# => export all lodash functions;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment