Giter Site home page Giter Site logo

lodash.com's Introduction

lodash

Site | Docs | Contributing | Wiki | Code of Conduct

The Lodash library exported as a UMD module.

$ bun run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js

Download

Lodash is released under the MIT license & supports modern environments.
Review the build differences & pick one that’s right for you.

Installation

In a browser:

<script src="lodash.js"></script>

Using bun:

$ bun i lodash

In Bun:

// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');

// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');

// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');

Looking for Lodash modules written in ES6 or smaller bundle sizes? Check out lodash-es.

Why Lodash?

Lodash makes JavaScript easier by taking the hassle out of working with arrays,
numbers, objects, strings, etc. Lodash’s modular methods are great for:

  • Iterating arrays, objects, & strings
  • Manipulating & testing values
  • Creating composite functions

Module Formats

Lodash is available in a variety of builds & module formats.

lodash.com's People

Contributors

aggarwalankush avatar bertyhell avatar bhavyampatel avatar bnjmnt4n avatar captbaritone avatar cheapsteak avatar christianmurphy avatar coldseattle avatar daedalus28 avatar danekszy avatar eddydg avatar edwinvdgraaf avatar gaven avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jdalton avatar jedwards1211 avatar jingyenloh avatar jsoref avatar loilo avatar mateuszkrzak avatar munter avatar nikolaymatrosov avatar papandreou avatar prashantpalikhe avatar saikiransathpadi avatar sibiraj-s avatar tolmasky avatar veksen avatar zackhall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lodash.com's Issues

Left navigation overlaps content

This happens in the following browsers which I've tested:

  • Firefox 45.0.2
  • Chrome Version 52.0.2743.116 (64-bit)
  • Safari Version 9.1.2 (11601.7.7)

I'm using a Mac.

bildschirmfoto 2016-09-06 um 17 35 20

Feature request: Reduce visual noise in docs

Whenever I take a look at the docs I struggle to properly keep track of the list of methods. I came to the conclusion that this is probably due to the noise of the _. on the left of every method.

I think it'd be a lot more convenient to have those two characters a little bit faded out. I've done this locally with some JavaScript and it's way nicer for my eyes (40% opacity).

What do you think?

issue(s) with `_.sort()` method

Hi there!

there is neither entry (in left column) not documentation (in right panel) for _.sort() method. dev tools does not suggest it as a method then I type _.sor... in console. However..

In docs on _.chain() it is mentioned and in our code we user it as a part of chain and I am sure it works. AFAIK if method is available as chained version there should be also its "vanilla" version. I have checked change log and I did not find any bits on that.

I still missing whole picture but I do hope you should help us here 😃

Font size and color makes method names hard to read

I'm having a harder time reading the method names in the Lodash docs due to the small font size.

Selector: html.docs .toc-container ul li a

font-size is currently 0.8em; I have an easier time reading it when I tweak it to 1.0em.

I'd have to check to be sure, but the font color may not meet accessibility standards for contrast. It looks a bit light to me, but I haven't pulled out a contrast checker to verify yet.

Colour of Section Headers

[Migrated from https://github.com/d10/lodash-docs-experiment/issues/3]

[Migrated from lodash/lodash#829]
I recently noticed that the documentation had had its colour theme changed. I've tried to work with it for a few hours, but the purple colour of the section header keeps distracting the eyes away from the actual documentation. Can it be changed to something more neutral?
The white earlier had been OK in that sense.

By @kumarharsh

Ability to jump to a method in documentation

It would be great if thre was an easier way to navigate the documentation with search. An autocomplete search would be a start. Please let me know if I am opening the issue in the correct project.

menu overlay doesn't adjust with the doc-container scroll.

Hey @zackhall!

I noticed when the menu is open in the mobile view that if the doc-container is scrolled the overlay doesn't follow. It may require reworking the overlay to be off the body and not the doc-container. Anyway after kicking it around for a while I figured you'd be better suited to tackle it.

`_` is not working in Chrome DevTools anymore (Chrome 52.0.2743.116 m)

_ is not working on the CLI of Chrome DevTools if you are on the /docs page. Instead of getting a grip on lodash it will return the HTML Element with the matching ID instead (<h3 id="_">). If you access it with window._ it is available as usual.

After accessing it with window._ once, it will be available as _ as well...

(iOS) TOC: intermittent scrolling behavior

It's hard to completely identify the issue here, but here are the key points:

  1. An initial page load will always be fine
  2. Sometimes, opening the menu will cause touch actions to be stuck in horizontal scrolling instead of vertical scrolling.
  3. A single tap on the screen will always resolve it.

firefox search box perf (input lag)

firefox 49.0.2 on ubuntu 14.04 x64

compared to chrome, there's a significant input lag in the searchbox making it almost unusable in firefox

Cache busting main.css and docs.js

With the constant updates to the site/docs, it would be nice to cache bust via filename.

I could do this. I'm fairly familiar on how to do it with gulp-rev, but I'm not completely familiar with Jekyll and how to pull in those revisions from a json file (or perhaps it needs to be added to a/the yml file?), so I could use some input.

Janky scrolls on both desktop and mobile

Highlight js creates tons of layers per code block. This makes layer recomposition take a lot of time. I think a decent solution would be to disable layers at the time of scrolling by adding a css class name on the root component.

Safari 9.0.2 won't scroll the side-nav-bar sometimes

So the left sidebar will stop scrolling after the right side was scrolled down. Somehow only the main content will scroll after that, even when hovering the sidebar. The sidebar will only start scrolling again after scrolling the main content to the top.

Chrome does not have this issue. I noticed that Chrome will always show the scrollbars on both, while Safari hides them. Maybe there is a css fix.

Rapid link rot.

I had previously been to this link:

https://lodash.com/docs

Which loaded a page fine, and I bookmarked the result for future reference. Unfortunately, this was during 4.16.2 and so because of the redirect this was the page bookmarked:

https://lodash.com/docs/4.16.2

That worked fine until very recently when the minor version was bumped and the old page was deleted without even a note or redirect to:

https://lodash.com/docs/4.16.4

Not very helpful when your bookmarks suddenly stop working, especially when the initial redirect was what led me to that page for marking in the first place.

Docs broken on Firefox

The list of functions in the TOC container has all empty HTML elements (no method name) on Firefox...

image

Release on lodash.com

I'm happily using the lodash.github.io site and wondering what the plan is to release on lodash.com officially. Great stuff 👍

"Modern environments" link on index page does not work

Hey, the link to jump to the "modern environment" section on the index page does not work. From a quick look, the link uses #support which doesn't seem to exist.

The link:

<a href="#support">modern environments</a>

The support section:

<section>
  <h2>Support</h2>
  <p><span class="rwd-line">Tested in Chrome 52-53, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 4-6 &amp; PhantomJS 2.1.1.</span> <span class="rwd-line">Automated <a href="https://saucelabs.com/u/lodash">browser</a> &amp; <a href="https://travis-ci.org/lodash">CI</a> test runs are available.</span></p>
</section>

Build step for JavaScript

Any plans for a build step (probably Babel/webpack) for the docs JS? I don't think loading the Babel transformer for each page is a good idea.

Logo Suggestions

I wanted to give a try on some logo concepts for lodash. Feedback is highly appreciated.

Logo Concept 1

Logo Concept 2

Logo Concept 3

Feel free to add your logo concepts here.

Browser locks while loading Lodash docs

When I load the Lodash docs, my browser freezes for several seconds.

Repro steps:

  • Navigate to docs from Lodash homepage (click Documentation link)
  • Browser (Firefox 48.0.1) freezes for a few seconds
  • Switch versions (to 3.10.1 or 2.4.2)
  • Browser freezes for a few seconds

Something about how the docs are being loaded is slowing things down. I haven't had time to dig in and find out why.

site maintenance / development owners

Lodash's site has remained largely unchanged since its creation in 2012. My css and design chops aren't great so I'm looking for volunteers to drive development and design of the lodash site and docs. I've opened this issue to start that discussion.

For starters I'd like to see

Expose `_` in global scope

I used to open up devtools and try fiddling with _ in lodash docs webstie to test things. Can we have that back please?

Switch + searchbox KO

When accessing the doc page, the version switch is sometimes not working + the seach box is not displayed. I usually get this error when accessing the page with an anchor.

Recommendation: don't use `marky-markdown`

marky-markdown seems to do a lot of specialised stuff related to npm which isn't really necessary. For example it wraps all the headings in <a>s, which isn’t necessary for our code. I think we can probably just use markdown-it and highlights, along with some code to customise it. Maybe cheerio also if we need to modify generated html output. What do y'all think?

lodash website/docs redesign

Hello, after the discussion about #8, a lot of talk has been about the doc generation itself, but none about the design or the interface, so I'm opening this issue. I will be suggesting something in the next few days, but until then, I'd still like to document what Lodash's website and docs are heading to:

  • Clean
  • Responsive/mobile friendly
  • Mobile menu (hamburger), maybe swipable on/off
  • Logo... maybe tweaked a little bit

For the docs:

  • Searchable
  • Improved readability
  • Methods linking to a REPL

Extra info:

Help, suggestion or contribution is nice. If you have something in mind, Photoshop renders work, too!

Documentation page does not have search field

See title. This I found in console.

/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js:1 GET https://lodash.com/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js 404 ()
4.17.2:1 GET https://lodash.com/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js 
sw.js:1 fetch failed: https://embed.runkit.com/ TypeError: Failed to fetch(…)
4.17.2:1 GET https://embed.runkit.com/ 
/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js:1 GET https://lodash.com/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js 404 ()
4.17.2:1 GET https://lodash.com/vendor/cdn.jsdelivr.net/g/[email protected],[email protected],[email protected](react.min.js+react-dom.min.js 
docs.js:1 Uncaught ReferenceError: Fuse is not defined(anonymous function) @ docs.js:1(anonymous function) @ docs.js:1

Search bar should always be visible

At the moment, the search bar is not always visible, rather it scrolls with the sidebar.

Which means if you scroll down the list scanning for something -- and don't find it -- you have to scroll all the way back up again to start a search. Or if you clicked on something at the bottom and then afterwards want to start a search for something else, you have to scroll the sidebar to the top.

So it would make more sense for the search bar to always be visible, regardless of how the sidebar has been scrolled.

There is a lot of free space in the main header where the search bar could live. Alternatively, it could be made fixed at the top of the sidebar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.