Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Sebastian Motraghi
2,173 views
Underscore.js
Technology
◦
Spiritual
◦
Read more
1
Save
Share
Embed
Embed presentation
Download
Downloaded 36 times
1
/ 13
2
/ 13
3
/ 13
4
/ 13
5
/ 13
6
/ 13
7
/ 13
8
/ 13
9
/ 13
10
/ 13
11
/ 13
12
/ 13
13
/ 13
More Related Content
PDF
RxSwift 예제로 감잡기
by
Yongha Yoo
KEY
Pimp your site with jQuery!
by
Elliott Kember
PDF
BABELで、ES2015(ES6)を学ぼう!
by
Toshio Ehara
PDF
Working With Ajax Frameworks
by
Jonathan Snook
PPTX
es6.concurrency()
by
Ingvar Stepanyan
PDF
jQuery PLUGIN
by
blueweb_sk
PDF
Java Script - Object-Oriented Programming
by
intive
PDF
Javascript and jQuery for Mobile
by
Ivano Malavolta
RxSwift 예제로 감잡기
by
Yongha Yoo
Pimp your site with jQuery!
by
Elliott Kember
BABELで、ES2015(ES6)を学ぼう!
by
Toshio Ehara
Working With Ajax Frameworks
by
Jonathan Snook
es6.concurrency()
by
Ingvar Stepanyan
jQuery PLUGIN
by
blueweb_sk
Java Script - Object-Oriented Programming
by
intive
Javascript and jQuery for Mobile
by
Ivano Malavolta
What's hot
PDF
PHP Profiling
by
Sungbum Hong
PPTX
JS programowanie obiektowe
by
Piotr Czajkowski
PDF
Vue.jsのユニットテスト
by
Joe_noh
PDF
modern javascript, unobtrusive javascript, jquery
by
Adam Zygadlewicz
PPT
Handbook - From jQuery to YUI 3
by
Ying-Hsiang Liao
PPTX
Gestire l'asincronia in javascript uno sguardo al futuro!
by
ApuliaSoft
PDF
Introducing Ballerina
by
WSO2
PDF
Jquery2
by
Inbal Geffen
PDF
アプリ設定の保存をシンプルに
by
susan335
PDF
Фатальный недостаток Node.js
by
Oleksii Okhrymenko
TXT
Base datos
by
Alexander Centeno Quirós
PDF
Java script.trend(spec)
by
dynamis
TXT
Index2
by
grateful7
PDF
Feeds. использование и создание плагинов. Feeds API
by
Alex S
PDF
Domótica. Test de conocimientos
by
Jesús Amieiro
PPT
Palestra sobre MongoDB com PHP no PHP'n'Rio
by
Suissa
KEY
モナド: お前はもう知っている
by
Kana Natsuno
PDF
PyconRu 2016. Осторожно, DSL!
by
Ivan Tsyganov
PPTX
Jquery ui, ajax
by
Ricardo Cavalcanti
PDF
Sis quiz
by
Clesio Veloso
PHP Profiling
by
Sungbum Hong
JS programowanie obiektowe
by
Piotr Czajkowski
Vue.jsのユニットテスト
by
Joe_noh
modern javascript, unobtrusive javascript, jquery
by
Adam Zygadlewicz
Handbook - From jQuery to YUI 3
by
Ying-Hsiang Liao
Gestire l'asincronia in javascript uno sguardo al futuro!
by
ApuliaSoft
Introducing Ballerina
by
WSO2
Jquery2
by
Inbal Geffen
アプリ設定の保存をシンプルに
by
susan335
Фатальный недостаток Node.js
by
Oleksii Okhrymenko
Base datos
by
Alexander Centeno Quirós
Java script.trend(spec)
by
dynamis
Index2
by
grateful7
Feeds. использование и создание плагинов. Feeds API
by
Alex S
Domótica. Test de conocimientos
by
Jesús Amieiro
Palestra sobre MongoDB com PHP no PHP'n'Rio
by
Suissa
モナド: お前はもう知っている
by
Kana Natsuno
PyconRu 2016. Осторожно, DSL!
by
Ivan Tsyganov
Jquery ui, ajax
by
Ricardo Cavalcanti
Sis quiz
by
Clesio Veloso
Underscore.js
1.
Underscore.js an introduction
2.
Collections in JS
are a pain!
4.
What do I
get? _.functions(_) => [ 'after', 'all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', 'contains', 'debounce', 'defaults', 'defer', 'delay', 'difference', 'each', 'escape'', 'extend', 'filter', 'find', 'first', 'flatten', 'functions', 'groupBy', 'head', 'identity', 'include', 'indexOf', 'initial', 'intersect', 'intersection', 'invoke', 'isArguments', 'isArray', 'isBoolean', 'isDate', 'isElement', 'isEmpty', 'isEqual', 'isFunction', 'isNaN', 'isNull', 'isNumber', 'isObject', 'isRegExp', 'isString', 'isUndefined', 'keys', 'last', 'lastIndexOf', 'map', 'max', 'memoize', 'methods', 'min', 'mixin', 'noConflict', 'once', 'pluck', 'range', 'reduce', 'reduceRight', 'reject', 'rest', 'select', 'shuffle', 'size', 'some', 'sortBy', 'sortedIndex', 'tail', 'tap', 'template', 'throttle', 'times', 'toArray', 'union', 'uniq', 'unique', 'uniqueId', 'values', 'without', 'wrap', 'zip' ]
5.
Functional vs Object-Oriented Object-Oriented
style: _(arr).pluck('name') Functional style: _.pluck(arr, 'name')
6.
Sorting an array
of objects var ppl = [ { name: 'Alice', age: 20 }, { name: 'Bob', age: 18 }, { name: 'Charles', age: 23 } ] _.sortBy(ppl, function(x){ return -1 * x.age }) => [{"name":"Charles","age":23}, {"name":"Alice","age":20}, {"name":"Bob","age":18}]
7.
Chaining multiple functions var
ppl = [ { name: 'Alice', age: 20 }, { name: 'Bob', age: 18 }, { name: 'Charles', age: 23 }, { name: 'Roberto', age:21 }] _(ppl).chain() .reject(function(x) { return /ob/i.test(x.name) }) .sortBy(function(x) { return -1 * x.age }) .pluck('name').value() => ["Charles", "Alice" ]
8.
Using "range" and
"reduce" to make a factorial function _.range(1,11) = [1,2,3,4,5,6,7,8,9,10] var fac = function(x) { return _.reduce(_.range(1,x+1), function(total, y) { return total * y }) }
9.
Array/object equality ['hello'] ==
['hello'] => false {foo:'bar'} == {foo:'bar'} => false _.isEqual(['hello'], ['hello']) => true _.isEqual({foo:'bar'}, {foo:'bar'})
10.
"Inheritance", _-style var foo
= { one: 1, two: 2 } var bar = { three: 3 } _.extend(foo,bar) => {"one":1,"two":2,"three":3}
11.
Throttling var throttled =
_.throttle(updatePosition, 100); $(window).scroll(throttled);
12.
Places you can
use it
13.
Thanks! Sebastian Motraghi @seb_m
http://blog.motraghi.us @xoxco http://xoxco.com
Download