日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 前端技术 > javascript >内容正文

javascript

Licia:最全最实用的 JavaScript 工具库

發(fā)布時(shí)間:2024/4/17 javascript 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Licia:最全最实用的 JavaScript 工具库 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

前言

在業(yè)務(wù)開發(fā)過程中,我們經(jīng)常會重復(fù)使用日期格式化cookie 操作模板瀏覽器判斷類型判斷等功能。為了避免不同項(xiàng)目之間進(jìn)行復(fù)制粘貼,可以將這些常用的函數(shù)封裝到一起并發(fā)布 npm 包。在將近三年的前端開發(fā)工作中,筆者將自己平時(shí)用到的工具庫統(tǒng)統(tǒng)封裝到了一個(gè)項(xiàng)目中 Licia。目前所包含模塊已達(dá)三百個(gè),基本可以滿足前端的日常工發(fā)需求。如果你對該項(xiàng)目感興趣,歡迎試用并幫忙持續(xù)改進(jìn):)

使用方法

一、安裝 npm 包

首先安裝 npm 包到本地。

npm i licia --save 復(fù)制代碼

安裝完之后,你就可以直接在項(xiàng)目中引用模塊了,就像使用 lodash 一樣。

var uuid = require('licia/uuid');console.log(uuid()); // -> 0e3b84af-f911-4a55-b78a-cedf6f0bd815 復(fù)制代碼

二、使用打包工具

該項(xiàng)目自帶打包工具 eustia,可以通過配置文件或命令行掃描源碼自動(dòng)生成項(xiàng)目專用的工具庫。

npm i eustia -g 復(fù)制代碼

假設(shè)你想html文件中使用trim方法,先直接在代碼中使用:

<html> <head><meta charset="utf-8"/><title>Eustia</title><script src="util.js"></script> </head> <body><script>var projectName = _.trim(' Eustia ');// Some code...</script> </body> </html> 復(fù)制代碼

然后跑下命令:

eustia build 復(fù)制代碼

該工具會掃描你的html代碼并生成一個(gè)util.js(默認(rèn)文件名)文件,大功告成!

PS: 之前做的手機(jī)調(diào)試工具 eruda 源碼里的 util.js 就是使用該工具生成的:)

三、使用在線工具生成 util 庫

你可以直接訪問 eustia.liriliri.io/builder.htm… 在輸入框輸入需要的工具函數(shù)(以空格分隔),然后點(diǎn)擊下載 util.js 文件并將該文件放入項(xiàng)目中去即可。

比如在小程序中你需要使用時(shí)間格式化,直接輸入 dateFormat 后將生成的 util.js 放入小程序源碼中,之后再在代碼里引用:

import { dateFormat } from './util.js';dateFormat(1525764204163, 'yyyy-mm-dd HH:MM:ss'); // -> '2018-05-08 15:23:24' 復(fù)制代碼

支持模塊匯總

$

jQuery like style dom manipulator.

Available methods

offset, hide, show, first, last, get, eq, on, off, html, text, val, css, attr, data, rmAttr, remove, addClass, rmClass, toggleClass, hasClass, append, prepend, before, after

var $btn = $('#btn'); $btn.html('eustia'); $btn.addClass('btn'); $btn.show(); $btn.on('click', function () {// Do something... }); 復(fù)制代碼

$attr

Element attribute manipulation.

Get the value of an attribute for the first element in the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namestringAttribute name
returnstringAttribute value of first element

Set one or more attributes for the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namestringAttribute name
valuestringAttribute value
NameTypeDesc
elementstring array elementElements to manipulate
attributesobjectObject of attribute-value pairs to set

remove

Remove an attribute from each element in the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namestringAttribute name
$attr('#test', 'attr1', 'test'); $attr('#test', 'attr1'); // -> test $attr.remove('#test', 'attr1'); $attr('#test', {'attr1': 'test','attr2': 'test' }); 復(fù)制代碼

$class

Element class manipulations.

add

Add the specified class(es) to each element in the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namesstring arrayClasses to add

has

Determine whether any of the matched elements are assigned the given class.

NameTypeDesc
elementstring array elementElements to manipulate
namestringClass name
returnbooleanTrue if elements has given class name

toggle

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.

NameTypeDesc
elementstring array elementElements to manipulate
namestringClass name to toggle

remove

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namesstringClass names to remove
$class.add('#test', 'class1'); $class.add('#test', ['class1', 'class2']); $class.has('#test', 'class1'); // -> true $class.remove('#test', 'class1'); $class.has('#test', 'class1'); // -> false $class.toggle('#test', 'class1'); $class.has('#test', 'class1'); // -> true 復(fù)制代碼

$css

Element css manipulation.

Get the computed style properties for the first element in the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namestringProperty name
returnstringCss value of first element

Set one or more CSS properties for the set of matched elements.

NameTypeDesc
elementstring array elementElements to manipulate
namestringProperty name
valuestringCss value
NameTypeDesc
elementstring array elementElements to manipulate
propertiesobjectObject of css-value pairs to set
$css('#test', {'color': '#fff','background': 'black' }); $css('#test', 'display', 'block'); $css('#test', 'color'); // -> #fff 復(fù)制代碼

$data

Wrapper of $attr, adds data- prefix to keys.

$data('#test', 'attr1', 'eustia'); 復(fù)制代碼

$event

bind events to certain dom elements.

function clickHandler() {// Do something... } $event.on('#test', 'click', clickHandler); $event.off('#test', 'click', clickHandler); 復(fù)制代碼

$insert

Insert html on different position.

before

Insert content before elements.

after

Insert content after elements.

prepend

Insert content to the beginning of elements.

append

Insert content to the end of elements.

NameTypeDesc
elementstring array elementElements to manipulate
contentstringHtml strings
// <div id="test"><div class="mark"></div></div> $insert.before('#test', '<div>licia</div>'); // -> <div>licia</div><div id="test"><div class="mark"></div></div> $insert.after('#test', '<div>licia</div>'); // -> <div id="test"><div class="mark"></div></div><div>licia</div> $insert.prepend('#test', '<div>licia</div>'); // -> <div id="test"><div>licia</div><div class="mark"></div></div> $insert.append('#test', '<div>licia</div>'); // -> <div id="test"><div class="mark"></div><div>licia</div></div> 復(fù)制代碼

$offset

Get the position of the element in document.

NameTypeDesc
elementstring array elementElements to get offset
$offset('#test'); // -> {left: 0, top: 0, width: 0, height: 0} 復(fù)制代碼

$property

Element property html, text, val getter and setter.

html

Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.

text

Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.

val

Get the current value of the first element in the set of matched elements or set the value of every matched element.

$property.html('#test', 'licia'); $property.html('#test'); // -> licia 復(fù)制代碼

$remove

Remove the set of matched elements from the DOM.

NameTypeDesc
elementstring array elementElements to delete
$remove('#test'); 復(fù)制代碼

$safeEls

Convert value into an array, if it's a string, do querySelector.

NameTypeDesc
valueelement array stringValue to convert
returnarrayArray of elements
$safeEls('.test'); // -> Array of elements with test class 復(fù)制代碼

$show

Show elements.

NameTypeDesc
elementstring array elementElements to show
$show('#test'); 復(fù)制代碼

Blob

Use Blob when available, otherwise BlobBuilder.

constructor

NameTypeDesc
partsarrayBlob parts
[opts]objectOptions
var blob = new Blob([]); 復(fù)制代碼

Class

Create JavaScript class.

NameTypeDesc
methodsobjectPublic methods
[statics]objectStatic methods
returnfunctionFunction used to create instances
var People = Class({initialize: function People(name, age){this.name = name;this.age = age;},introduce: function (){return 'I am ' + this.name + ', ' + this.age + ' years old.';} });var Student = People.extend({initialize: function Student(name, age, school){this.callSuper(People, 'initialize', arguments);this.school = school;},introduce: function (){return this.callSuper(People, 'introduce') + '\n I study at ' + this.school + '.';} }, {is: function (obj){return obj instanceof Student;} });var a = new Student('allen', 17, 'Hogwarts'); a.introduce(); // -> 'I am allen, 17 years old. \n I study at Hogwarts.' Student.is(a); // -> true 復(fù)制代碼

Color

Color converter.

constructor

NameTypeDesc
colorstring objectColor to convert

toRgb

Get color rgb string format.

toHex

Get color hex string format.

toHsl

Get color hsl string format.

parse

[static] Parse color string into object containing value and model.

NameTypeDesc
colorstringColor string
returnobjectObject containing value and model
Color.parse('rgb(170, 287, 204, 0.5)'); // -> {val: [170, 187, 204, 0.5], model: 'rgb'} var color = new Color('#abc'); color.toRgb(); // -> 'rgb(170, 187, 204)' color.toHsl(); // -> 'hsl(210, 25%, 73%)' 復(fù)制代碼

Dispatcher

Flux dispatcher.

Related docs.

var dispatcher = new Dispatcher();dispatcher.register(function (payload) {switch (payload.actionType){// Do something} });dispatcher.dispatch({actionType: 'action' }); 復(fù)制代碼

Emitter

Event emitter class which provides observer pattern.

on

Bind event.

off

Unbind event.

once

Bind event that trigger once.

NameTypeDesc
eventstringEvent name
listenerfunctionEvent listener

emit

Emit event.

NameTypeDesc
eventstringEvent name
...args*Arguments passed to listener

mixin

[static] Mixin object class methods.

NameTypeDesc
objobjectObject to mixin
var event = new Emitter(); event.on('test', function () { console.log('test') }); event.emit('test'); // Logs out 'test'. Emitter.mixin({}); 復(fù)制代碼

Enum

Enum type implementation.

constructor

NameTypeDesc
arrarrayArray of strings
NameTypeDesc
objobjectPairs of key and value
var importance = new Enum(['NONE', 'TRIVIAL', 'REGULAR', 'IMPORTANT', 'CRITICAL' ]);if (val === importance.CRITICAL) {// Do something. } 復(fù)制代碼

JsonTransformer

Json to json transformer.

constructor

NameTypeDesc
[data={}]objectJson object to manipulate

set

Set object value.

NameTypeDesc
[key]stringObject key
val*Value to set

If key is not given, the whole source object is replaced by val.

get

Get object value.

NameTypeDesc
[key]stringObject key
return*Specified value or whole object

remove

NameTypeDesc
keyarray stringObject keys to remove

map

Shortcut for array map.

NameTypeDesc
fromstringFrom object path
tostringTarget object path
fnfunctionFunction invoked per iteration

filter

Shortcut for array filter.

compute

Compute value from several object values.

NameTypeDesc
fromarray stringSource values
tostringTarget object path
fnfunctionFunction to compute target value
var data = new JsonTransformer({books: [{title: 'Book 1',price: 5}, {title: 'Book 2',price: 10}],author: {lastname: 'Su',firstname: 'RedHood'} }); data.filter('books', function (book) { return book.price > 5 }); data.compute('author', function (author) { return author.firstname + author.lastname }); data.set('count', data.get('books').length); data.get(); // -> {books: [{title: 'Book 2', price: 10}], author: 'RedHoodSu', count: 1} 復(fù)制代碼

LinkedList

Doubly-linked list implementation.

push

Add an value to the end of the list.

NameTypeDesc
val*Value to push
returnnumberCurrent size

pop

Get the last value of the list.

unshift

Add an value to the head of the list.

shift

Get the first value of the list.

forEach

Iterate over the list.

toArr

Convert the list to a JavaScript array.

var linkedList = new LinkedList(); linkedList.push(5); linkedList.pop(); // -> 5 復(fù)制代碼

LocalStore

LocalStorage wrapper.

Extend from Store.

constructor

NameTypeDesc
namestringLocalStorage item name
dataobjectDefault data
var store = new LocalStore('licia'); store.set('name', 'licia'); 復(fù)制代碼

Logger

Simple logger with level filter.

constructor

NameTypeDesc
namestringLogger name
[level=DEBUG]numberLogger level

setLevel

NameTypeDesc
levelnumber stringLogger level

getLevel

Get current level.

trace, debug, info, warn, error

Logging methods.

Log Levels

TRACE, DEBUG, INFO, WARN, ERROR and SILENT.

var logger = new Logger('licia', Logger.level.ERROR); logger.trace('test');// Format output. logger.formatter = function (type, argList) {argList.push(new Date().getTime());return argList; };logger.on('all', function (type, argList) {// It's not affected by log level. });logger.on('debug', function (argList) {// Affected by log level. }); 復(fù)制代碼

MutationObserver

Safe MutationObserver, does nothing if MutationObserver is not supported.

var observer = new MutationObserver(function (mutations) {// Do something. }); observer.observe(document.htmlElement); observer.disconnect(); 復(fù)制代碼

Promise

Lightweight Promise implementation.

Promises spec

function get(url) {return new Promise(function (resolve, reject){var req = new XMLHttpRequest();req.open('GET', url);req.onload = function (){req.status == 200 ? resolve(req.reponse) : reject(Error(req.statusText));};req.onerror = function () { reject(Error('Network Error')) };req.send();}); }get('test.json').then(function (result) {// Do something... }); 復(fù)制代碼

Queue

Queue data structure.

clear

Clear the queue.

enqueue

Add an item to the queue.

NameTypeDesc
item*Item to enqueue
returnnumberCurrent size

dequeue

Remove the first item of the queue.

peek

Get the first item without removing it.

forEach

Iterate over the queue.

NameTypeDesc
iterateefunctionFunction invoked iteration
[ctx]*Function context

toArr

Convert queue to a JavaScript array.

var queue = new Queue();console.log(queue.size); // -> 0 queue.enqueue(2); queue.enqueue(3); queue.dequeue(); // -> 2 console.log(queue.size); // -> 1 queue.peek(); // -> 3 console.log(queue.size); // -> 1 復(fù)制代碼

ReduceStore

Simplified redux like state container.

constructor

NameTypeDesc
reducerfunctionFunction returns next state
initialState*Initial state

subscribe

Add a change listener.

NameTypeDesc
listenerfunctionCallback to invoke on every dispatch
returnfunctionFunction to unscribe

dispatch

Dispatch an action.

NameTypeDesc
actionobjectObject representing changes
returnobjectSame action object

getState

Get the current state.

var store = new ReduceStore(function (state, action) {switch (action.type){case 'INCREMENT': return state + 1;case 'DECREMENT': return state - 1;default: return state;} }, 0);store.subscribe(function () {console.log(store.getState()); });store.dispatch({type: 'INCREMENT'}); // 1 store.dispatch({type: 'INCREMENT'}); // 2 store.dispatch({type: 'DECREMENT'}); // 1 復(fù)制代碼

Select

Simple wrapper of querySelectorAll to make dom selection easier.

constructor

NameTypeDesc
selectorstringDom selector string

find

Get desdendants of current matched elements.

NameTypeDesc
selectorstringDom selector string

each

Iterate over matched elements.

NameTypeDesc
fnfunctionFunction to execute for each element
var $test = new Select('#test'); $test.find('.test').each(function (idx, element) {// Manipulate dom nodes }); 復(fù)制代碼

SessionStore

SessionStorage wrapper.

Extend from Store.

constructor

NameTypeDesc
namestringSessionStorage item name
dataobjectDefault data
var store = new SessionStore('licia'); store.set('name', 'licia'); 復(fù)制代碼

Stack

Stack data structure.

clear

Clear the stack.

push

Add an item to the stack.

NameTypeDesc
item*Item to add
returnnumberCurrent size

pop

Get the last item of the stack.

peek

Get the last item without removing it.

forEach

Iterate over the stack.

NameTypeDesc
iterateefunctionFunction invoked iteration
[ctx]*Function context

toArr

Convert the stack to a JavaScript stack.

var stack = new Stack();stack.push(2); // -> 1 stack.push(3); // -> 2 stack.pop(); // -> 3 復(fù)制代碼

State

Simple state machine.

Extend from Emitter.

constructor

NameTypeDesc
initialstringInitial state
eventsstringEvents to change state

is

Check current state.

NameTypeDesc
valuestringState to check
returnbooleanTrue if current state equals given value
var state = new State('empty', {load: {from: 'empty', to: 'pause'},play: {from: 'pause', to: 'play'},pause: {from: ['play', 'empty'], to: 'pause'},unload: {from: ['play', 'pause'], to: 'empty'} });state.is('empty'); // -> true state.load(); state.is('pause'); // -> true state.on('play', function (src) {console.log(src); // -> 'eustia' }); state.on('error', function (err, event) {// Error handler }); state.play('eustia'); 復(fù)制代碼

Store

Memory storage.

Extend from Emitter.

constructor

NameTypeDesc
dataobjectInitial data

set

Set value.

NameTypeDesc
keystringValue key
val*Value to set

Set values.

NameTypeDesc
valsobjectKey value pairs

This emit a change event whenever is called.

get

Get value.

NameTypeDesc
keystringValue key
return*Value of given key

Get values.

NameTypeDesc
keysarrayArray of keys
returnobjectKey value pairs

remove

Remove value.

NameTypeDesc
keystring arrayKey to remove

clear

Clear all data.

each

Iterate over values.

NameTypeDesc
fnfunctionFunction invoked per interation
var store = new Store('test'); store.set('user', {name: 'licia'}); store.get('user').name; // -> 'licia' store.clear(); store.each(function (val, key) {// Do something. }); store.on('change', function (key, newVal, oldVal) {// It triggers whenever set is called. }); 復(fù)制代碼

Tween

Tween engine for JavaScript animations.

Extend from Emitter.

constructor

NameTypeDesc
objobjectValues to tween

to

NameTypeDesc
destinationobjFinal properties
durationnumberTween duration
easestring functionEasing function

play

Begin playing forward.

pause

Pause the animation.

paused

Get animation paused state.

progress

Update or get animation progress.

NameTypeDesc
[progress]numberNumber between 0 and 1
var pos = {x: 0, y: 0};var tween = new Tween(pos); tween.on('update', function (target) {console.log(target.x, target.y); }).on('end', function (target) {console.log(target.x, target.y); // -> 100, 100 }); tween.to({x: 100, y: 100}, 1000, 'inElastic').play(); 復(fù)制代碼

Url

Simple url manipulator.

constructor

NameTypeDesc
url=locationstringUrl string

setQuery

Set query value.

NameTypeDesc
namestringQuery name
valuestringQuery value
returnUrlthis
NameTypeDesc
namesobjectquery object
returnUrlthis

rmQuery

Remove query value.

NameTypeDesc
namestring arrayQuery name
returnUrlthis

parse

[static] Parse url into an object.

NameTypeDesc
urlstringUrl string
returnobjectUrl object

stringify

[static] Stringify url object into a string.

NameTypeDesc
urlobjectUrl object
returnstringUrl string

An url object contains the following properties:

NameDesc
protocolThe protocol scheme of the URL (e.g. http:)
slashesA boolean which indicates whether the protocol is followed by two forward slashes (//)
authAuthentication information portion (e.g. username:password)
hostnameHost name without port number
portOptional port number
pathnameURL path
queryParsed object containing query string
hashThe "fragment" portion of the URL including the pound-sign (#)
var url = new Url('http://example.com:8080?eruda=true'); console.log(url.port); // -> '8080' url.query.foo = 'bar'; url.rmQuery('eruda'); utl.toString(); // -> 'http://example.com:8080/?foo=bar' 復(fù)制代碼

Validator

Object values validation.

constructor

NameTypeDesc
optionsobjectValidation configuration

validate

Validate object.

NameTypeDesc
objobjectObject to validate
return*Validation result, true means ok

addPlugin

[static] Add plugin.

NameTypeDesc
namestringPlugin name
pluginfunctionValidation handler

Default Plugins

Required, number, boolean, string and regexp.

Validator.addPlugin('custom', function (val, key, config) {if (typeof val === 'string' && val.length === 5) return true;return key + ' should be a string with length 5'; }); var validator = new Validator({'test': {required: true,custom: true} }); validator.validate({}); // -> 'test is required' validator.validate({test: 1}); // -> 'test should be a string with length 5'; validator.validate({test: 'licia'}); // -> true 復(fù)制代碼

abbrev

Calculate the set of unique abbreviations for a given set of strings.

NameTypeDesc
...arrstringList of names
returnobjectAbbreviation map
abbrev('lina', 'luna'); // -> {li: 'lina', lin: 'lina', lina: 'lina', lu: 'luna', lun: 'luna', luna: 'luna'} 復(fù)制代碼

after

Create a function that invokes once it's called n or more times.

NameTypeDesc
nnumberNumber of calls before invoked
fnfunctionFunction to restrict
returnfunctionNew restricted function
var fn = after(5, function() {// -> Only invoke after fn is called 5 times. }); 復(fù)制代碼

ajax

Perform an asynchronous HTTP request.

NameTypeDesc
optionsobjectAjax options

Available options:

NameTypeDesc
urlstringRequest url
datastring objectRequest data
dataType=jsonstringResponse type(json, xml)
contentType=application/x-www-form-urlencodedstringRequest header Content-Type
successfunctionSuccess callback
errorfunctionError callback
completefunctionCallback after request
timeoutnumberRequest timeout

get

Shortcut for type = GET;

post

Shortcut for type = POST;

NameTypeDesc
urlstringRequest url
[data]string objectRequest data
successfunctionSuccess callback
dataTypefunctionResponse type
ajax({url: 'http://example.com',data: {test: 'true'},error: function () {},success: function (data){// ...},dataType: 'json' });ajax.get('http://example.com', {}, function (data) {// ... }); 復(fù)制代碼

allKeys

Retrieve all the names of object's own and inherited properties.

NameTypeDesc
objobjectObject to query
returnarrayArray of all property names

Members of Object's prototype won't be retrieved.

var obj = Object.create({zero: 0}); obj.one = 1; allKeys(obj) // -> ['zero', 'one'] 復(fù)制代碼

arrToMap

Make an object map using array of strings.

NameTypeDesc
arrarrayArray of strings
val=true*Key value
returnobjectObject map
var needPx = arrToMap(['column-count', 'columns', 'font-weight', 'line-weight', 'opacity', 'z-index', 'zoom' ]);if (needPx[key]) val += 'px'; 復(fù)制代碼

atob

Use Buffer to emulate atob when running in node.

atob('SGVsbG8gV29ybGQ='); // -> 'Hello World' 復(fù)制代碼

average

Get average value of given numbers.

NameTypeDesc
...numnumberNumbers to calculate
returnnumberAverage value
average(5, 3, 1); // -> 3 復(fù)制代碼

base64

Basic base64 encoding and decoding.

encode

Turn a byte array into a base64 string.

NameTypeDesc
arrarrayByte array
returnstringBase64 string
base64.encode([168, 174, 155, 255]); // -> 'qK6b/w==' 復(fù)制代碼

decode

Turn a base64 string into a byte array.

NameTypeDesc
strstringBase64 string
returnarrayByte array
base64.decode('qK6b/w=='); // -> [168, 174, 155, 255] 復(fù)制代碼

before

Create a function that invokes less than n times.

NameTypeDesc
nnumberNumber of calls at which fn is no longer invoked
fnfunctionFunction to restrict
returnfunctionNew restricted function

Subsequent calls to the created function return the result of the last fn invocation.

$(element).on('click', before(5, function() {})); // -> allow function to be call 4 times at last. 復(fù)制代碼

bind

Create a function bound to a given object.

NameTypeDesc
fnfunctionFunction to bind
ctx*This binding of given fn
[...rest]*Optional arguments
returnfunctionNew bound function
var fn = bind(function (msg) {console.log(this.name + ':' + msg); }, {name: 'eustia'}, 'I am a utility library.'); fn(); // -> 'eustia: I am a utility library.' 復(fù)制代碼

btoa

Use Buffer to emulate btoa when running in node.

btoa('Hello World'); // -> 'SGVsbG8gV29ybGQ=' 復(fù)制代碼

bubbleSort

Bubble sort implementation.

NameTypeDesc
arrarrayArray to sort
[cmp]functionComparator
bubbleSort([2, 1]); // -> [1, 2] 復(fù)制代碼

callbackify

Convert a function that returns a Promise to a function following the error-first callback style.

NameTypeDesc
fnfunctionFunction that returns a Promise
returnfunctionFunction following the error-fist callback style
function fn() {return new Promise(function (resolve, reject){// ...}); }var cbFn = callbackify(fn);cbFn(function (err, value) {// ... }); 復(fù)制代碼

camelCase

Convert string to "camelCase".

NameTypeDesc
strstringString to convert
returnstringCamel cased string
camelCase('foo-bar'); // -> fooBar camelCase('foo bar'); // -> fooBar camelCase('foo_bar'); // -> fooBar camelCase('foo.bar'); // -> fooBar 復(fù)制代碼

capitalize

Convert the first character to upper case and the remaining to lower case.

NameTypeDesc
strstringString to capitalize
returnstringCapitalized string
capitalize('rED'); // -> Red 復(fù)制代碼

castPath

Cast value into a property path array.

NameTypeDesc
str*Value to inspect
[obj]objectObject to query
returnarrayProperty path array
castPath('a.b.c'); // -> ['a', 'b', 'c'] castPath(['a']); // -> ['a'] castPath('a[0].b'); // -> ['a', '0', 'b'] castPath('a.b.c', {'a.b.c': true}); // -> ['a.b.c'] 復(fù)制代碼

centerAlign

Center align text in a string.

NameTypeDesc
strstring arrayString to align
[width]numberTotal width of each line
returnstringCenter aligned string
centerAlign('test', 8); // -> ' test' centerAlign('test\nlines', 8); // -> ' test\n lines' centerAlign(['test', 'lines'], 8); // -> ' test\n lines' 復(fù)制代碼

char

Return string representing a character whose Unicode code point is the given integer.

NameTypeDesc
numnumberInteger to convert
returnstringString representing corresponding char
char(65); // -> 'A' char(97); // -> 'a' 復(fù)制代碼

chunk

Split array into groups the length of given size.

NameTypeDesc
arrarrayArray to process
size=1numberLength of each chunk
chunk([1, 2, 3, 4], 2); // -> [[1, 2], [3, 4]] chunk([1, 2, 3, 4], 3); // -> [[1, 2, 3], [4]] chunk([1, 2, 3, 4]); // -> [[1], [2], [3], [4]] 復(fù)制代碼

clamp

Clamp number within the inclusive lower and upper bounds.

NameTypeDesc
nnumberNumber to clamp
[lower]numberLower bound
uppernumberUpper bound
returnnumberClamped number
clamp(-10, -5, 5); // -> -5 clamp(10, -5, 5); // -> 5 clamp(2, -5, 5); // -> 2 clamp(10, 5); // -> 5 clamp(2, 5); // -> 2 復(fù)制代碼

className

Utility for conditionally joining class names.

NameTypeDesc
...classstring object arrayClass names
returnstringJoined class names
className('a', 'b', 'c'); // -> 'a b c' className('a', false, 'b', 0, 1, 'c'); // -> 'a b 1 c' className('a', ['b', 'c']); // -> 'a b c' className('a', {b: false, c: true}); // -> 'a c' className('a', ['b', 'c', {d: true, e: false}]); // -> 'a b c d'; 復(fù)制代碼

clone

Create a shallow-copied clone of the provided plain object.

Any nested objects or arrays will be copied by reference, not duplicated.

NameTypeDesc
val*Value to clone
return*Cloned value
clone({name: 'eustia'}); // -> {name: 'eustia'} 復(fù)制代碼

cloneDeep

Recursively clone value.

NameTypeDesc
val*Value to clone
return*Deep cloned Value
var obj = [{a: 1}, {a: 2}]; var obj2 = cloneDeep(obj); console.log(obj[0] === obj2[1]); // -> false 復(fù)制代碼

cmpVersion

Compare version strings.

NameTypeDesc
v1stringVersion to compare
v2stringVersion to compare
returnnumberComparison result
cmpVersion('1.1.8', '1.0.4'); // -> 1 cmpVersion('1.0.2', '1.0.2'); // -> 0 cmpVersion('2.0', '2.0.0'); // -> 0 cmpVersion('3.0.1', '3.0.0.2'); // -> 1 cmpVersion('1.1.1', '1.2.3'); // -> -1 復(fù)制代碼

compact

Return a copy of the array with all falsy values removed.

The values false, null, 0, "", undefined, and NaN are falsey.

NameTypeDesc
arrarrayArray to compact
returnarrayNew array of filtered values
compact([0, 1, false, 2, '', 3]); // -> [1, 2, 3] 復(fù)制代碼

compose

Compose a list of functions.

Each function consumes the return value of the function that follows.

NameTypeDesc
...fnfunctionFunctions to compose
returnfunctionComposed function
var welcome = compose(function (name) {return 'hi: ' + name; }, function (name) {return name.toUpperCase() + '!'; });welcome('licia'); // -> 'hi: LICIA!' 復(fù)制代碼

compressImg

Compress image using canvas.

NameTypeDesc
fileFile BlobImage file
optsobjectOptions
cbfunctionCallback

Available options:

NameTypeDesc
maxWidthnumberMax width
maxHeightnumberMax height
widthnumberOutput image width
heightnumberOutput image height
mineTypestringMine type
quality=0.8numberImage quality, range from 0 to 1

In order to keep image ratio, height will be ignored when width is set.

And maxWith, maxHeight will be ignored if width or height is set.

compressImg(file, {maxWidth: 200 }, function (err, file) {// ... }); 復(fù)制代碼

concat

Concat multiple arrays into a single array.

NameTypeDesc
...arrarrayArrays to concat
returnarrayConcatenated array
concat([1, 2], [3], [4, 5]); // -> [1, 2, 3, 4, 5] 復(fù)制代碼

contain

Check if the value is present in the list.

NameTypeDesc
arrayarray objectTarget list
value*Value to check
returnbooleanTrue if value is present in the list
contain([1, 2, 3], 1); // -> true contain({a: 1, b: 2}, 1); // -> true 復(fù)制代碼

convertBase

Convert base of a number.

NameTypeDesc
numnumber stringNumber to convert
fromnumberBase from
tonumberBase to
returnstringConverted number
convertBase('10', 2, 10); // -> '2' convertBase('ff', 16, 2); // -> '11111111' 復(fù)制代碼

cookie

Simple api for handling browser cookies.

get

Get cookie value.

NameTypeDesc
keystringCookie key
returnstringCorresponding cookie value

set

Set cookie value.

NameTypeDesc
keystringCookie key
valstringCookie value
[options]objectCookie options
returnexportsModule cookie

remove

Remove cookie value.

NameTypeDesc
keystringCookie key
[options]objectCookie options
returnexportsModule cookie
cookie.set('a', '1', {path: '/'}); cookie.get('a'); // -> '1' cookie.remove('a'); 復(fù)制代碼

copy

Copy text to clipboard using document.execCommand.

NameTypeDesc
textstringText to copy
[cb]functionOptional callback
copy('text', function (err) {// Handle errors. }); 復(fù)制代碼

createAssigner

Used to create extend, extendOwn and defaults.

NameTypeDesc
keysFnfunctionFunction to get object keys
defaultsbooleanNo override when set to true
returnfunctionResult function, extend...

createUrl

CreateObjectURL wrapper.

NameTypeDesc
dataFile Blob string arrayUrl data
[opts]objectUsed when data is not a File or Blob
returnstringBlob url
createUrl('test', {type: 'text/plain'}); // -> Blob url createUrl(['test', 'test']); createUrl(new Blob([])); createUrl(new File(['test'], 'test.txt')); 復(fù)制代碼

cssSupports

Check if browser supports a given CSS feature.

NameTypeDesc
namestringCss property name
[val]stringCss property value
returnbooleanTrue if supports
cssSupports('display', 'flex'); // -> true cssSupports('display', 'invalid'); // -> false cssSupports('text-decoration-line', 'underline'); // -> true cssSupports('grid'); // -> true cssSupports('invalid'); // -> false 復(fù)制代碼

curry

Function currying.

NameTypeDesc
fnfunctionFunction to curry
returnfunctionNew curried function
var add = curry(function (a, b) { return a + b }); var add1 = add(1); add1(2); // -> 3 復(fù)制代碼

dateFormat

Simple but extremely useful date format function.

NameTypeDesc
[date=new Date]DateDate object to format
maskstringFormat mask
[utc=false]booleanUTC or not
[gmt=false]booleanGMT or not
MaskDescription
dDay of the month as digits; no leading zero for single-digit days
ddDay of the month as digits; leading zero for single-digit days
dddDay of the week as a three-letter abbreviation
ddddDay of the week as its full name
mMonth as digits; no leading zero for single-digit months
mmMonth as digits; leading zero for single-digit months
mmmMonth as a three-letter abbreviation
mmmmMonth as its full name
yyYear as last two digits; leading zero for years less than 10
yyyyYear represented by four digits
hHours; no leading zero for single-digit hours (12-hour clock)
hhHours; leading zero for single-digit hours (12-hour clock)
HHours; no leading zero for single-digit hours (24-hour clock)
HHHours; leading zero for single-digit hours (24-hour clock)
MMinutes; no leading zero for single-digit minutes
MMMinutes; leading zero for single-digit minutes
sSeconds; no leading zero for single-digit seconds
ssSeconds; leading zero for single-digit seconds
l LMilliseconds. l gives 3 digits. L gives 2 digits
tLowercase, single-character time marker string: a or p
ttLowercase, two-character time marker string: am or pm
TUppercase, single-character time marker string: A or P
TTUppercase, two-character time marker string: AM or PM
ZUS timezone abbreviation, e.g. EST or MDT
oGMT/UTC timezone offset, e.g. -0500 or +0230
SThe date's ordinal suffix (st, nd, rd, or th)
UTC:Must be the first four characters of the mask
dateFormat('isoDate'); // -> 2016-11-19 dateFormat('yyyy-mm-dd HH:MM:ss'); // -> 2016-11-19 19:00:04 dateFormat(new Date(), 'yyyy-mm-dd'); // -> 2016-11-19 復(fù)制代碼

debounce

Return a new debounced version of the passed function.

NameTypeDesc
fnfunctionFunction to debounce
waitnumberNumber of milliseconds to delay
returnfunctionNew debounced function
$(window).resize(debounce(calLayout, 300)); 復(fù)制代碼

debug

A tiny JavaScript debugging utility.

NameTypeDesc
namestringNamespace
returnfunctionFunction to print decorated log
var d = debug('test'); d('doing lots of uninteresting work'); d.enabled = false; 復(fù)制代碼

decodeUriComponent

Better decodeURIComponent that does not throw if input is invalid.

NameTypeDesc
strstringString to decode
returnstringDecoded string
decodeUriComponent('%%25%'); // -> '%%%' decodeUriComponent('%E0%A4%A'); // -> '\xE0\xA4%A' 復(fù)制代碼

defaults

Fill in undefined properties in object with the first value present in the following list of defaults objects.

NameTypeDesc
objobjectDestination object
*srcobjectSources objects
returnobjectDestination object
defaults({name: 'RedHood'}, {name: 'Unknown', age: 24}); // -> {name: 'RedHood', age: 24} 復(fù)制代碼

define

Define a module, should be used along with use.

NameTypeDesc
namestringModule name
[requires]arrayDependencies
methodfunctionModule body

The module won't be executed until it's used by use function.

define('A', function () {return 'A'; }); define('B', ['A'], function (A) {return 'B' + A; }); 復(fù)制代碼

defineProp

Shortcut for Object.defineProperty(defineProperties).

NameTypeDesc
objobjectObject to define
propstringProperty path
descriptorobjectProperty descriptor
returnobjectObject itself
NameTypeDesc
objobjectObject to define
propobjectProperty descriptors
returnobjectObject itself
var obj = {b: {c: 3}, d: 4, e: 5}; defineProp(obj, 'a', {get: function (){return this.e * 2;} }); console.log(obj.a); // -> 10 defineProp(obj, 'b.c', {set: (function (val){// this is pointed to obj.bthis.e = val;}).bind(obj) }); obj.b.c = 2; console.log(obj.a); // -> 4;obj = {a: 1, b: 2, c: 3}; defineProp(obj, {a: {get: function (){return this.c;}},b: {set: function (val){this.c = val / 2;}} }); console.log(obj.a); // -> 3 obj.b = 4; console.log(obj.a); // -> 2 復(fù)制代碼

delay

Invoke function after certain milliseconds.

NameTypeDesc
fnfunctionFunction to delay
waitnumberNumber of milliseconds to delay invocation
[...args]*Arguments to invoke fn with
delay(function (text) {console.log(text); }, 1000, 'later'); // -> Logs 'later' after one second 復(fù)制代碼

delegate

Event delegation.

add

Add event delegation.

NameTypeDesc
elelementParent element
typestringEvent type
selectorstringMatch selector
cbfunctionEvent callback

remove

Remove event delegation.

var container = document.getElementById('container'); function clickHandler() {// Do something... } delegate.add(container, 'click', '.children', clickHandler); delegate.remove(container, 'click', '.children', clickHandler); 復(fù)制代碼

detectBrowser

Detect browser info using ua.

NameTypeDesc
[ua=navigator.userAgent]stringBrowser userAgent
returnobjectObject containing name and version

Browsers supported: ie, chrome, edge, firefox, opera, safari, ios(mobile safari), android(android browser)

var browser = detectBrowser(); if (browser.name === 'ie' && browser.version < 9) {// Do something about old IE... } 復(fù)制代碼

detectOs

Detect operating system using ua.

NameTypeDesc
[ua=navigator.userAgent]stringBrowser userAgent
returnstringOperating system name

Supported os: windows, os x, linux, ios, android, windows phone

if (detectOs() === 'ios') {// Do something about ios... } 復(fù)制代碼

difference

Create an array of unique array values not included in the other given array.

NameTypeDesc
arrarrayArray to inspect
[...rest]arrayValues to exclude
returnarrayNew array of filtered values
difference([3, 2, 1], [4, 2]); // -> [3, 1] 復(fù)制代碼

dotCase

Convert string to "dotCase".

NameTypeDesc
strstringString to convert
returnstringDot cased string
dotCase('fooBar'); // -> foo.bar dotCase('foo bar'); // -> foo.bar 復(fù)制代碼

download

Trigger a file download on client side.

NameTypeDesc
dataBlob File string arrayData to download
namestringFile name
type=text/plainstringData type
download('test', 'test.txt'); 復(fù)制代碼

each

Iterate over elements of collection and invokes iteratee for each element.

NameTypeDesc
objobject arrayCollection to iterate over
iterateefunctionFunction invoked per iteration
[ctx]*Function context
each({'a': 1, 'b': 2}, function (val, key) {}); 復(fù)制代碼

easing

Easing functions adapted from http://jqueryui.com/

NameTypeDesc
percentnumberNumber between 0 and 1
returnnumberCalculated number
easing.linear(0.5); // -> 0.5 easing.inElastic(0.5, 500); // -> 0.03125 復(fù)制代碼

endWith

Check if string ends with the given target string.

NameTypeDesc
strstringThe string to search
suffixstringString suffix
returnbooleanTrue if string ends with target
endWith('ab', 'b'); // -> true 復(fù)制代碼

escape

Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters.

NameTypeDesc
strstringString to escape
returnstringEscaped string
escape('You & Me'); -> // -> 'You &amp; Me' 復(fù)制代碼

escapeJsStr

Escape string to be a valid JavaScript string literal between quotes.

http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4

NameTypeDesc
strstringString to escape
returnstringEscaped string
escapeJsStr('\"\n'); // -> '\\"\\\\n' 復(fù)制代碼

escapeRegExp

Escape special chars to be used as literals in RegExp constructors.

NameTypeDesc
strstringString to escape
returnstringEscaped string
escapeRegExp('[licia]'); // -> '\\[licia\\]' 復(fù)制代碼

evalCss

Load css into page.

NameTypeDesc
cssstringCss code
evalCss('body{background:#08c}'); 復(fù)制代碼

evalJs

Execute js in given context.

NameTypeDesc
jsstringJavaScript code
[ctx=global]objectContext
evalJs('5+2'); // -> 7 evalJs('this.a', {a: 2}); // -> 2 復(fù)制代碼

every

Check if predicate return truthy for all elements.

NameTypeDesc
objarray objectCollection to iterate over
predicatefunctionFunction invoked per iteration
ctx*Predicate context
returnbooleanTrue if all elements pass the predicate check
every([2, 4], function (val) {return val % 2 === 0; }); // -> false 復(fù)制代碼

extend

Copy all of the properties in the source objects over to the destination object.

NameTypeDesc
objobjectDestination object
...srcobjectSources objects
returnobjectDestination object
extend({name: 'RedHood'}, {age: 24}); // -> {name: 'RedHood', age: 24} 復(fù)制代碼

extendDeep

Recursive object extending.

NameTypeDesc
objobjectDestination object
...srcobjectSources objects
returnobjectDestination object
extendDeep({name: 'RedHood',family: {mother: 'Jane',father: 'Jack'} }, {family: {brother: 'Bruce'} }); // -> {name: 'RedHood', family: {mother: 'Jane', father: 'Jack', brother: 'Bruce'}} 復(fù)制代碼

extendOwn

Like extend, but only copies own properties over to the destination object.

NameTypeDesc
objobjectDestination object
*srcobjectSources objects
returnobjectDestination object
extendOwn({name: 'RedHood'}, {age: 24}); // -> {name: 'RedHood', age: 24} 復(fù)制代碼

extractBlockCmts

Extract block comments from source code.

NameTypeDesc
strstringString to extract
returnarrayBlock comments
extractBlockCmts('\/*licia*\/'); // -> ['licia'] 復(fù)制代碼

extractUrls

Extract urls from plain text.

NameTypeDesc
strstringText to extract
returnarrayUrl list
var str = '[Official site: http://eustia.liriliri.io](http://eustia.liriliri.io)'; extractUrl(str); // -> ['http://eustia.liriliri.io'] 復(fù)制代碼

fetch

Turn XMLHttpRequest into promise like.

Note: This is not a complete fetch pollyfill.

NameTypeDesc
urlstringRequest url
optionsobjectRequest options
returnpromiseRequest promise
fetch('test.json', {method: 'GET',timeout: 3000,headers: {},body: '' }).then(function (res) {return res.json(); }).then(function (data) {console.log(data); }); 復(fù)制代碼

fibonacci

Calculate fibonacci number.

NameTypeDesc
nnumberIndex of fibonacci sequence
returnnumberExpected fibonacci number
fibonacci(1); // -> 1 fibonacci(3); // -> 2 復(fù)制代碼

fileSize

Turn bytes into human readable file size.

NameTypeDesc
bytesnumberFile bytes
returnstringReadable file size
fileSize(5); // -> '5' fileSize(1500); // -> '1.46K' fileSize(1500000); // -> '1.43M' fileSize(1500000000); // -> '1.4G' fileSize(1500000000000); // -> '1.36T' 復(fù)制代碼

fill

Fill elements of array with value.

NameTypeDesc
arrarrayArray to fill
val*Value to fill array with
start=0numberStart position
end=arr.lengthnumberEnd position
returnarrayFilled array
fill([1, 2, 3], '*'); // -> ['*', '*', '*'] fill([1, 2, 3], '*', 1, 2); // -> [1, '*', 3] 復(fù)制代碼

filter

Iterates over elements of collection, returning an array of all the values that pass a truth test.

NameTypeDesc
objarrayCollection to iterate over
predicatefunctionFunction invoked per iteration
[ctx]*Predicate context
returnarrayArray of all values that pass predicate
filter([1, 2, 3, 4, 5], function (val) {return val % 2 === 0; }); // -> [2, 4] 復(fù)制代碼

find

Find the first value that passes a truth test in a collection.

NameTypeDesc
objarray objectCollection to iterate over
predicatefunctionFunction invoked per iteration
[ctx]*Predicate context
return*First value that passes predicate
find([{name: 'john',age: 24 }, {name: 'jane',age: 23 }], function (val) {return val.age === 23; }); // -> {name: 'jane', age: 23} 復(fù)制代碼

findIdx

Return the first index where the predicate truth test passes.

NameTypeDesc
arrarrayArray to search
predicatefunctionFunction invoked per iteration
returnnumberIndex of matched element
findIdx([{name: 'john',age: 24 }, {name: 'jane',age: 23 }], function (val) {return val.age === 23; }); // -> 1 復(fù)制代碼

findKey

Return the first key where the predicate truth test passes.

NameTypeDesc
objobjectObject to search
predicatefunctionFunction invoked per iteration
[ctx]*Predicate context
returnstringKey of matched element
findKey({a: 1, b: 2}, function (val) {return val === 1; }); // -> a 復(fù)制代碼

findLastIdx

Return the last index where the predicate truth test passes.

NameTypeDesc
arrarrayArray to search
predicatefunctionFunction invoked per iteration
returnnumberLast index of matched element
findLastIdx([{name: 'john',age: 24 }, {name: 'jane',age: 23 }, {name: 'kitty',age: 24 }], function (val) {return val.age === 24; }); // -> 2 復(fù)制代碼

flatten

Recursively flatten an array.

NameTypeDesc
arrarrayArray to flatten
returnarrayNew flattened array
flatten(['a', ['b', ['c']], 'd', ['e']]); // -> ['a', 'b', 'c', 'd', 'e'] 復(fù)制代碼

fnParams

Get a function parameter's names.

NameTypeDesc
fnfunctionFunction to get parameters
returnarrayNames
fnParams(function (a, b) {}); // -> ['a', 'b'] 復(fù)制代碼

format

Format string in a printf-like format.

NameTypeDesc
strstringString to format
...values*Values to replace format specifiers
returnstringFormatted string

Format Specifiers

SpecifierDesc
%sString
%d, %iInteger
%fFloating point value
%oObject
format('%s_%s', 'foo', 'bar'); // -> 'foo bar' 復(fù)制代碼

fraction

Convert number to fraction.

NameTypeDesc
numnumberNumber to convert
returnstringCorresponding fraction
fraction(1.2); // -> '6/5' 復(fù)制代碼

freeze

Shortcut for Object.freeze.

Use Object.defineProperties if Object.freeze is not supported.

NameTypeDesc
objobjectObject to freeze
returnobjectObject passed in
var a = {b: 1}; freeze(a); a.b = 2; console.log(a); // -> {b: 1} 復(fù)制代碼

freezeDeep

Recursively use Object.freeze.

NameTypeDesc
objobjectObject to freeze
returnobjectObject passed in
var a = {b: {c: 1}}; freezeDeep(a); a.b.c = 2; console.log(a); // -> {b: {c: 1}} 復(fù)制代碼

gcd

Compute the greatest common divisor using Euclid's algorithm.

NameTypeDesc
anumberNumber to calculate
bnumberNumber to calculate
returnnumberGreatest common divisor
gcd(121, 44); // -> 11 復(fù)制代碼

getUrlParam

Get url param.

NameTypeDesc
namestringParam name
url=locationstringUrl to get param
returnstringParam value
getUrlParam('test', 'http://example.com/?test=true'); // -> 'true' 復(fù)制代碼

has

Checks if key is a direct property.

NameTypeDesc
objobjectObject to query
keystringPath to check
returnbooleanTrue if key is a direct property
has({one: 1}, 'one'); // -> true 復(fù)制代碼

hotkey

Capture keyboard input to trigger given events.

on

Register keyboard listener.

NameTypeDesc
keystringKey string
listenerfunctionKey listener

off

Unregister keyboard listener.

hotkey.on('k', function () {console.log('k is pressed'); }); function keyDown() {} hotkey.on('shift+a, shift+b', keyDown); hotkey.off('shift+a', keyDown); 復(fù)制代碼

hslToRgb

Convert hsl to rgb.

NameTypeDesc
hslarrayHsl values
returnarrayRgb values
hslToRgb([165, 59, 50, 0.8]); // -> [52, 203, 165, 0.8] 復(fù)制代碼

identity

Return the first argument given.

NameTypeDesc
val*Any value
return*Given value
identity('a'); // -> 'a' 復(fù)制代碼

idxOf

Get the index at which the first occurrence of value.

NameTypeDesc
arrarrayArray to search
val*Value to search for
fromIdx=0numberIndex to search from
idxOf([1, 2, 1, 2], 2, 2); // -> 3 復(fù)制代碼

indent

Indent each line in a string.

NameTypeDesc
strstringString to indent
[char]stringCharacter to prepend
[len]numberIndent length
returnstringIndented string
indent('foo\nbar', ' ', 4); // -> 'foo\n bar' 復(fù)制代碼

inherits

Inherit the prototype methods from one constructor into another.

NameTypeDesc
ClassfunctionChild Class
SuperClassfunctionSuper Class
function People(name) {this._name = name; } People.prototype = {getName: function (){return this._name;} }; function Student(name) {this._name = name; } inherits(Student, People); var s = new Student('RedHood'); s.getName(); // -> 'RedHood' 復(fù)制代碼

insertionSort

Insertion sort implementation.

NameTypeDesc
arrarrayArray to sort
[cmp]functionComparator
insertionSort([2, 1]); // -> [1, 2] 復(fù)制代碼

intersect

Compute the list of values that are the intersection of all the arrays.

NameTypeDesc
...arrarrayArrays to inspect
returnarrayNew array of inspecting values
intersect([1, 2, 3, 4], [2, 1, 10], [2, 1]); // -> [1, 2] 復(fù)制代碼

intersectRange

Intersect two ranges.

NameTypeDesc
aobjectRange a
bobjectRange b
returnobjectIntersection if exist
intersectRange({start: 0, end: 12}, {start: 11, end: 13}); // -> {start: 11, end: 12} intersectRange({start: 0, end: 5}, {start: 6, end: 7}); // -> undefined 復(fù)制代碼

invert

Create an object composed of the inverted keys and values of object.

NameTypeDesc
objobjectObject to invert
returnobjectNew inverted object

If object contains duplicate values, subsequent values overwrite property assignments of previous values unless multiValue is true.

invert({a: 'b', c: 'd', e: 'f'}); // -> {b: 'a', d: 'c', f: 'e'} 復(fù)制代碼

isAbsoluteUrl

Check if an url is absolute.

NameTypeDesc
urlstringUrl to check
returnbooleanTrue if url is absolute
isAbsoluteUrl('http://www.surunzi.com'); // -> true isAbsoluteUrl('//www.surunzi.com'); // -> false isAbsoluteUrl('surunzi.com'); // -> false 復(fù)制代碼

isArgs

Check if value is classified as an arguments object.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an arguments object
(function () {isArgs(arguments); // -> true })(); 復(fù)制代碼

isArr

Check if value is an Array object.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an Array object
isArr([]); // -> true isArr({}); // -> false 復(fù)制代碼

isArrBuffer

Check if value is an ArrayBuffer.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an ArrayBuffer
isArrBuffer(new ArrayBuffer(8)); // -> true 復(fù)制代碼

isArrLike

Check if value is array-like.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is array like

Function returns false.

isArrLike('test'); // -> true isArrLike(document.body.children); // -> true; isArrLike([1, 2, 3]); // -> true 復(fù)制代碼

isBlob

Check if value is a Blob.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a Blob
isBlob(new Blob([])); // -> true; isBlob([]); // -> false 復(fù)制代碼

isBool

Check if value is a boolean primitive.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a boolean
isBool(true); // -> true isBool(false); // -> true isBool(1); // -> false 復(fù)制代碼

isBrowser

Check if running in a browser.

console.log(isBrowser); // -> true if running in a browser 復(fù)制代碼

isBuffer

Check if value is a buffer.

NameTypeDesc
val*The value to check
returnbooleanTrue if value is a buffer
isBuffer(new Buffer(4)); // -> true 復(fù)制代碼

isClose

Check if values are close(almost equal) to each other.

abs(a-b) <= max(relTol * max(abs(a), abs(b)), absTol)

NameTypeDesc
anumberNumber to compare
bnumberNumber to compare
relTol=1e-9numberRelative tolerance
absTol=0numberAbsolute tolerance
returnbooleanTrue if values are close
isClose(1, 1.0000000001); // -> true isClose(1, 2); // -> false isClose(1, 1.2, 0.3); // -> true isClose(1, 1.2, 0.1, 0.3); // -> true 復(fù)制代碼

isDataUrl

Check if a string is a valid data url.

NameTypeDesc
strstringString to check
returnbooleanTrue if string is a data url
isDataUrl('http://eustia.liriliri.io'); // -> false isDataUrl('data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D'); // -> true 復(fù)制代碼

isDate

Check if value is classified as a Date object.

NameTypeDesc
val*value to check
returnbooleanTrue if value is a Date object
isDate(new Date()); // -> true 復(fù)制代碼

isEl

Check if value is a DOM element.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a DOM element
isEl(document.body); // -> true 復(fù)制代碼

isEmail

Loosely validate an email address.

NameTypeDesc
valstringValue to check
returnbooleanTrue if value is an email like string
isEmail('surunzi@foxmail.com'); // -> true 復(fù)制代碼

isEmpty

Check if value is an empty object or array.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is empty
isEmpty([]); // -> true isEmpty({}); // -> true isEmpty(''); // -> true 復(fù)制代碼

isEqual

Performs an optimized deep comparison between the two objects, to determine if they should be considered equal.

NameTypeDesc
val*Value to compare
other*Other value to compare
returnbooleanTrue if values are equivalent
isEqual([1, 2, 3], [1, 2, 3]); // -> true 復(fù)制代碼

isErr

Check if value is an error.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an error
isErr(new Error()); // -> true 復(fù)制代碼

isEven

Check if number is even.

NameTypeDesc
numnumberNumber to check
returnbooleanTrue if number is even
isOdd(0); // -> true isOdd(1); // -> false isOdd(2); // -> true 復(fù)制代碼

isFile

Check if value is a file.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a file
isFile(new File(['test'], "test.txt", {type: "text/plain"})); // -> true 復(fù)制代碼

isFinite

Check if value is a finite primitive number.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a finite number
isFinite(3); // -> true isFinite(Infinity); // -> false 復(fù)制代碼

isFn

Check if value is a function.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a function

Generator function is also classified as true.

isFn(function() {}); // -> true isFn(function*() {}); // -> true 復(fù)制代碼

isGeneratorFn

Check if value is a generator function.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a generator function
isGeneratorFn(function * () {}); // -> true; isGeneratorFn(function () {}); // -> false; 復(fù)制代碼

isInt

Checks if value is classified as a Integer.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is correctly classified
isInt(5); // -> true isInt(5.1); // -> false isInt({}); // -> false 復(fù)制代碼

isJson

Check if value is a valid JSON.

It uses JSON.parse() and a try... catch block.

NameTypeDesc
valstringJSON string
returnbooleanTrue if value is a valid JSON
isJson('{"a": 5}'); // -> true isJson("{'a': 5}"); // -> false 復(fù)制代碼

isLeapYear

Check if a year is a leap year.

NameTypeDesc
yearnumberYear to check
returnbooleanTrue if year is a leap year
isLeapYear(2000); // -> true isLeapYear(2002); // -> false 復(fù)制代碼

isMatch

Check if keys and values in src are contained in obj.

NameTypeDesc
objobjectObject to inspect
srcobjectObject of property values to match
returnbooleanTrue if object is match
isMatch({a: 1, b: 2}, {a: 1}); // -> true 復(fù)制代碼

isMiniProgram

Check if running in wechat mini program.

console.log(isMiniProgram); // -> true if running in mini program. 復(fù)制代碼

isMobile

Check whether client is using a mobile browser using ua.

NameTypeDesc
[ua=navigator.userAgent]stringUser agent
returnbooleanTrue if ua belongs to mobile browsers
isMobile(navigator.userAgent); 復(fù)制代碼

isNaN

Check if value is an NaN.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an NaN

Undefined is not an NaN, different from global isNaN function.

isNaN(0); // -> false isNaN(NaN); // -> true 復(fù)制代碼

isNative

Check if value is a native function.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a native function
isNative(function () {}); // -> false isNative(Math.min); // -> true 復(fù)制代碼

isNil

Check if value is null or undefined, the same as value == null.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is null or undefined
isNil(null); // -> true isNil(void 0); // -> true isNil(undefined); // -> true isNil(false); // -> false isNil(0); // -> false isNil([]); // -> false 復(fù)制代碼

isNode

Check if running in node.

console.log(isNode); // -> true if running in node 復(fù)制代碼

isNull

Check if value is an Null.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an Null
isNull(null); // -> true 復(fù)制代碼

isNum

Check if value is classified as a Number primitive or object.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is correctly classified
isNum(5); // -> true isNum(5.1); // -> true isNum({}); // -> false 復(fù)制代碼

isNumeric

Check if value is numeric.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is numeric
isNumeric(1); // -> true isNumeric('1'); // -> true isNumeric(Number.MAX_VALUE); // -> true isNumeric(0144); // -> true isNumeric(0xFF); // -> true isNumeric(''); // -> false isNumeric('1.1.1'); // -> false isNumeric(NaN); // -> false 復(fù)制代碼

isObj

Check if value is the language type of Object.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is an object

Language Spec

isObj({}); // -> true isObj([]); // -> true 復(fù)制代碼

isOdd

Check if number is odd.

NameTypeDesc
numnumberNumber to check
returnbooleanTrue if number is odd
isOdd(0); // -> false isOdd(1); // -> true isOdd(2); // -> false 復(fù)制代碼

isPlainObj

Check if value is an object created by Object constructor.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a plain object
isPlainObj({}); // -> true isPlainObj([]); // -> false isPlainObj(function () {}); // -> false 復(fù)制代碼

isPrimitive

Check if value is string, number, boolean or null.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a primitive
isPrimitive(5); // -> true isPrimitive('abc'); // -> true isPrimitive(false); // -> true 復(fù)制代碼

isPromise

Check if value looks like a promise.

NameTypeDesc
val*Value to check
returnbooleanTrue if value looks like a promise
isPromise(new Promise(function () {})); // -> true isPromise({}); // -> false 復(fù)制代碼

isRegExp

Check if value is a regular expression.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a regular expression
isRegExp(/a/); // -> true 復(fù)制代碼

isRelative

Check if path appears to be relative.

NameTypeDesc
pathstringPath to check
returnbooleanTrue if path appears to be relative
isRelative('README.md'); // -> true 復(fù)制代碼

isRetina

Determine if running on a high DPR device or not.

console.log(isRetina); // -> true if high DPR 復(fù)制代碼

isStr

Check if value is a string primitive.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a string primitive
isStr('licia'); // -> true 復(fù)制代碼

isStream

Check if value is a Node.js stream.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a Node.js stream
var stream = require('stream');isStream(new stream.Stream()); // -> true 復(fù)制代碼

isTypedArr

Check if value is a typed array.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is a typed array
isTypedArr([]); // -> false isTypedArr(new Unit8Array); // -> true 復(fù)制代碼

isUndef

Check if value is undefined.

NameTypeDesc
val*Value to check
returnbooleanTrue if value is undefined
isUndef(void 0); // -> true isUndef(null); // -> false 復(fù)制代碼

isUrl

Loosely validate an url.

NameTypeDesc
valstringValue to check
returnbooleanTrue if value is an url like string
isUrl('http://www.example.com?foo=bar&param=test'); // -> true 復(fù)制代碼

isWindows

Check if platform is windows.

console.log(isWindows); // -> true if running on windows 復(fù)制代碼

jsonp

A simple jsonp implementation.

NameTypeDesc
optsobjectJsonp Options

Available options:

NameTypeDesc
urlstringRequest url
dataobjectRequest data
successfunctionSuccess callback
param=callbackstringCallback param
namestringCallback name
errorfunctionError callback
completefunctionCallback after request
timeoutnumberRequest timeout
jsonp({url: 'http://example.com',data: {test: 'true'},success: function (data){// ...} }); 復(fù)制代碼

kebabCase

Convert string to "kebabCase".

NameTypeDesc
strstringString to convert
returnstringKebab cased string
kebabCase('fooBar'); // -> foo-bar kebabCase('foo bar'); // -> foo-bar kebabCase('foo_bar'); // -> foo-bar kebabCase('foo.bar'); // -> foo-bar 復(fù)制代碼

keyCode

Key codes and key names conversion.

Get key code's name.

NameTypeDesc
codenumberKey code
returnstringCorresponding key name

Get key name's code.

NameTypeDesc
namestringKey name
returnnumberCorresponding key code
keyCode(13); // -> 'enter' keyCode('enter'); // -> 13 復(fù)制代碼

keys

Create an array of the own enumerable property names of object.

NameTypeDesc
objobjectObject to query
returnarrayArray of property names
keys({a: 1}); // -> ['a'] 復(fù)制代碼

last

Get the last element of array.

NameTypeDesc
arrarrayThe array to query
return*The last element of array
last([1, 2]); // -> 2 復(fù)制代碼

lazyRequire

Require modules lazily.

var r = lazyRequire(require);var _ = r('underscore');// underscore is required only when _ is called. _().isNumber(5); 復(fù)制代碼

linkify

Hyperlink urls in a string.

NameTypeDesc
strstringString to hyperlink
[hyperlink]functionFunction to hyperlink url
returnstringResult string
var str = 'Official site: http://eustia.liriliri.io' linkify(str); // -> 'Official site: <a href="http://eustia.liriliri.io">http://eustia.liriliri.io</a>' linkify(str, function (url) {return '<a href="' + url + '" target="_blank">' + url + '</a>'; }); 復(fù)制代碼

loadCss

Inject link tag into page with given href value.

NameTypeDesc
srcstringStyle source
cbfunctionOnload callback
loadCss('style.css', function (isLoaded) {// Do something... }); 復(fù)制代碼

loadImg

Load image with given src.

NameTypeDesc
srcstringImage source
[cb]functionOnload callback
loadImg('http://eustia.liriliri.io/img.jpg', function (err, img) {console.log(img.width, img.height); }); 復(fù)制代碼

loadJs

Inject script tag into page with given src value.

NameTypeDesc
srcstringScript source
cbfunctionOnload callback
loadJs('main.js', function (isLoaded) {// Do something... }); 復(fù)制代碼

longest

Get the longest item in an array.

NameTypeDesc
arrarrayArray to inspect
return*Longest item
longest(['a', 'abcde', 'abc']); // -> 'abcde' 復(fù)制代碼

lowerCase

Convert string to lower case.

NameTypeDesc
strstringString to convert
returnstringLower cased string
lowerCase('TEST'); // -> 'test' 復(fù)制代碼

lpad

Pad string on the left side if it's shorter than length.

NameTypeDesc
strstringString to pad
lennumberPadding length
[chars]stringString used as padding
returnstringResulted string
lpad('a', 5); // -> ' a' lpad('a', 5, '-'); // -> '----a' lpad('abc', 3, '-'); // -> 'abc' lpad('abc', 5, 'ab'); // -> 'ababc' 復(fù)制代碼

ltrim

Remove chars or white-spaces from beginning of string.

NameTypeDesc
strstringString to trim
charsstring arrayCharacters to trim
returnstringTrimmed string
ltrim(' abc '); // -> 'abc ' ltrim('_abc_', '_'); // -> 'abc_' ltrim('_abc_', ['a', '_']); // -> 'bc_' 復(fù)制代碼

map

Create an array of values by running each element in collection through iteratee.

NameTypeDesc
objarray objectCollection to iterate over
iterateefunctionFunction invoked per iteration
[ctx]*Function context
returnarrayNew mapped array
map([4, 8], function (n) { return n * n; }); // -> [16, 64] 復(fù)制代碼

mapObj

Map for objects.

NameTypeDesc
objobjectObject to iterate over
iterateefunctionFunction invoked per iteration
[ctx]*Function context
returnobjectNew mapped object
mapObj({a: 1, b: 2}, function (val, key) { return val + 1 }); // -> {a: 2, b: 3} 復(fù)制代碼

matcher

Return a predicate function that checks if attrs are contained in an object.

NameTypeDesc
attrsobjectObject of property values to match
returnfunctionNew predicate function
var objects = [{a: 1, b: 2, c: 3 },{a: 4, b: 5, c: 6 } ]; filter(objects, matcher({a: 4, c: 6 })); // -> [{a: 4, b: 5, c: 6 }] 復(fù)制代碼

max

Get maximum value of given numbers.

NameTypeDesc
...numnumberNumbers to calculate
returnnumberMaximum value
max(2.3, 1, 4.5, 2); // 4.5 復(fù)制代碼

memStorage

Memory-backed implementation of the Web Storage API.

A replacement for environments where localStorage or sessionStorage is not available.

var localStorage = window.localStorage || memStorage; localStorage.setItem('test', 'licia'); 復(fù)制代碼

memoize

Memoize a given function by caching the computed result.

NameTypeDesc
fnfunctionFunction to have its output memoized
[hashFn]functionFunction to create cache key
returnfunctionNew memoized function
var fibonacci = memoize(function(n) {return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); }); 復(fù)制代碼

meta

Document meta manipulation, turn name and content into key value pairs.

Get meta content with given name. If name is omitted, all pairs will be return.

NameTypeDesc
[name]string arrayMeta name
returnstringMeta content

Set meta content.

NameTypeDesc
namestringMeta name
contentstringMeta content
NameTypeDesc
metasobjectObject of name content pairs

remove

Remove metas.

NameTypeDesc
namestring arrayMeta name
// <meta name="a" content="1"/> <meta name="b" content="2"/> <meta name="c" content="3"/> meta(); // -> {a: '1', b: '2', c: '3'} meta('a'); // -> '1' meta(['a', 'c']); // -> {a: '1', c: '3'} meta('d', '4'); meta({d: '5',e: '6',f: '7' }); meta.remove('d'); meta.remove(['e', 'f']); 復(fù)制代碼

methods

Return a sorted list of the names of every method in an object.

NameTypeDesc
objobjectObject to check
returnarrayFunction names in object
methods(console); // -> ['Console', 'assert', 'dir', ...] 復(fù)制代碼

min

Get minimum value of given numbers.

NameTypeDesc
...numnumberNumbers to calculate
returnnumberMinimum value
min(2.3, 1, 4.5, 2); // 1 復(fù)制代碼

mkdir

Recursively create directories.

NameTypeDesc
dirstringDirectory to create
[mode=0777]numberDirectory mode
callbackfunctionCallback
mkdir('/tmp/foo/bar/baz', function (err) {if (err) console.log(err);else console.log('Done'); }); 復(fù)制代碼

moment

Tiny moment.js like implementation.

It only supports a subset of moment.js api.

Available methods

format, isValid, isLeapYear, isSame, isBefore, isAfter, year, month, date, hour, minute, second, millisecond, unix, clone, toDate, toArray, toJSON, toISOString, toObject, toString, set, startOf, endOf, add, subtract, diff

Not supported

locale and units like quarter and week.

Note: Format uses dateFormat module, so the mask is not quite the same as moment.js.

moment('20180501').format('yyyy-mm-dd'); // -> '2018-05-01' 復(fù)制代碼

ms

Convert time string formats to milliseconds.

Turn time string into milliseconds.

NameTypeDesc
strstringString format
returnnumberMilliseconds

Turn milliseconds into time string.

NameTypeDesc
numnumberMilliseconds
returnstringString format
ms('1s'); // -> 1000 ms('1m'); // -> 60000 ms('1.5h'); // -> 5400000 ms('1d'); // -> 86400000 ms('1y'); // -> 31557600000 ms('1000'); // -> 1000 ms(1500); // -> '1.5s' ms(60000); // -> '1m' 復(fù)制代碼

negate

Create a function that negates the result of the predicate function.

NameTypeDesc
predicatefunctionPredicate to negate
returnfunctionNew function
function even(n) { return n % 2 === 0 } filter([1, 2, 3, 4, 5, 6], negate(even)); // -> [1, 3, 5] 復(fù)制代碼

nextTick

Next tick for both node and browser.

NameTypeDesc
cbfunctionFunction to call

Use process.nextTick if available.

Otherwise setImmediate or setTimeout is used as fallback.

nextTick(function () {// Do something... }); 復(fù)制代碼

noop

A no-operation function.

noop(); // Does nothing 復(fù)制代碼

normalizePath

Normalize file path slashes.

NameTypeDesc
pathstringPath to normalize
returnstringNormalized path
normalizePath('\\foo\\bar\\'); // -> '/foo/bar/' normalizePath('./foo//bar'); // -> './foo/bar' 復(fù)制代碼

now

Gets the number of milliseconds that have elapsed since the Unix epoch.

now(); // -> 1468826678701 復(fù)制代碼

objToStr

Alias of Object.prototype.toString.

NameTypeDesc
value*Source value
returnstringString representation of given value
objToStr(5); // -> '[object Number]' 復(fù)制代碼

omit

Opposite of pick.

NameTypeDesc
objobjectSource object
filterstring array functionObject filter
returnobjectFiltered object
omit({a: 1, b: 2}, 'a'); // -> {b: 2} omit({a: 1, b: 2, c: 3}, ['b', 'c']) // -> {a: 1} omit({a: 1, b: 2, c: 3, d: 4}, function (val, key) {return val % 2; }); // -> {b: 2, d: 4}## once Create a function that invokes once.|Name |Type |Desc | |------|--------|-----------------------| |fn |function|Function to restrict | |return|function|New restricted function|```javascript function init() {}; var initOnce = once(init); initOnce(); initOnce(); // -> init is invoked once 復(fù)制代碼

optimizeCb

Used for function context binding.

orientation

Screen orientation helper.

on

Bind change event.

off

Unbind change event.

get

Get current orientation(landscape or portrait).

orientation.on('change', function (direction) {console.log(direction); // -> 'portrait' }); orientation.get(); // -> 'landscape' 復(fù)制代碼

pad

Pad string on the left and right sides if it's shorter than length.

NameTypeDesc
strstringString to pad
lennumberPadding length
charsstringString used as padding
returnstringResulted string
pad('a', 5); // -> ' a ' pad('a', 5, '-'); // -> '--a--' pad('abc', 3, '-'); // -> 'abc' pad('abc', 5, 'ab'); // -> 'babca' pad('ab', 5, 'ab'); // -> 'ababa' 復(fù)制代碼

pairs

Convert an object into a list of [key, value] pairs.

NameTypeDesc
objobjectObject to convert
returnarrayList of [key, value] pairs
pairs({a: 1, b: 2}); // -> [['a', 1], ['b', 2]] 復(fù)制代碼

parallel

Run an array of functions in parallel.

NameTypeDesc
tasksarrayArray of functions
[cb]functionCallback once completed
parallel([function(cb){setTimeout(function () { cb(null, 'one') }, 200);},function(cb){setTimeout(function () { cb(null, 'two') }, 100);} ], function (err, results) {// results -> ['one', 'two'] }); 復(fù)制代碼

parseArgs

Parse command line argument options, the same as minimist.

NameTypeDesc
argsarrayArgument array
optsobjectParse options
returnobjectParsed result

options

NameTypeDesc
namesobjectoption names
shorthandsobjectoption shorthands
parseArgs(['eustia', '--output', 'util.js', '-w'], {names: {output: 'string',watch: 'boolean'},shorthands: {output: 'o',watch: 'w'} }); // -> {remain: ['eustia'], output: 'util.js', watch: true} 復(fù)制代碼

partial

Partially apply a function by filling in given arguments.

NameTypeDesc
fnfunctionFunction to partially apply arguments to
...partials*Arguments to be partially applied
returnfunctionNew partially applied function
var sub5 = partial(function (a, b) { return b - a }, 5); sub(20); // -> 15 復(fù)制代碼

pascalCase

Convert string to "pascalCase".

NameTypeDesc
strstringString to convert
returnstringPascal cased string
pascalCase('fooBar'); // -> FooBar pascalCase('foo bar'); // -> FooBar pascalCase('foo_bar'); // -> FooBar pascalCase('foo.bar'); // -> FooBar 復(fù)制代碼

perfNow

High resolution time up to microsecond precision.

var start = perfNow();// Do something.console.log(perfNow() - start); 復(fù)制代碼

pick

Return a filtered copy of an object.

NameTypeDesc
objobjectSource object
filterstring array functionObject filter
returnobjectFiltered object
pick({a: 1, b: 2}, 'a'); // -> {a: 1} pick({a: 1, b: 2, c: 3}, ['b', 'c']) // -> {b: 2, c: 3} pick({a: 1, b: 2, c: 3, d: 4}, function (val, key) {return val % 2; }); // -> {a: 1, c: 3} 復(fù)制代碼

pluck

Extract a list of property values.

NameTypeDesc
objobject arrayCollection to iterate over
keystring arrayProperty path
returnarrayNew array of specified property
var stooges = [{name: 'moe', age: 40},{name: 'larry', age: 50},{name: 'curly', age: 60} ]; pluck(stooges, 'name'); // -> ['moe', 'larry', 'curly'] 復(fù)制代碼

precision

Find decimal precision of a given number.

NameTypeDesc
numnumberNumber to check
returnnumberPrecision
precision(1.234); // -> 3; 復(fù)制代碼

prefix

Add vendor prefixes to a CSS attribute.

NameTypeDesc
namestringProperty name
returnstringPrefixed property name

dash

Create a dasherize version.

prefix('text-emphasis'); // -> 'WebkitTextEmphasis' prefix.dash('text-emphasis'); // -> '-webkit-text-emphasis' prefix('color'); // -> 'color' 復(fù)制代碼

promisify

Convert callback based functions into Promises.

NameTypeDesc
fnfunctionCallback based function
[multiArgs=false]booleanIf callback has multiple success value
returnbooleanResult function

If multiArgs is set to true, the resulting promise will always fulfill with an array of the callback's success values.

var fs = require('fs');var readFile = promisify(fs.readFile); readFile('test.js', 'utf-8').then(function (data) {// Do something with file content. }); 復(fù)制代碼

property

Return a function that will itself return the key property of any passed-in object.

NameTypeDesc
pathstring arrayPath of the property to get
returnfunctionNew accessor function
var obj = {a: {b: 1}}; property('a')(obj); // -> {b: 1} property(['a', 'b'])(obj); // -> 1 復(fù)制代碼

query

Parse and stringify url query strings.

parse

Parse a query string into an object.

NameTypeDesc
strstringQuery string
returnobjectQuery object

stringify

Stringify an object into a query string.

NameTypeDesc
objobjectQuery object
returnstringQuery string
query.parse('foo=bar&eruda=true'); // -> {foo: 'bar', eruda: 'true'} query.stringify({foo: 'bar', eruda: 'true'}); // -> 'foo=bar&eruda=true' query.parse('name=eruda&name=eustia'); // -> {name: ['eruda', 'eustia']} 復(fù)制代碼

raf

Shortcut for requestAnimationFrame.

Use setTimeout if native requestAnimationFrame is not supported.

var id = raf(function tick() {// Animation stuffraf(tick); }); raf.cancel(id); 復(fù)制代碼

random

Produces a random number between min and max(inclusive).

NameTypeDesc
minnumberMinimum possible value
maxnumberMaximum possible value
[floating=false]booleanFloat or not
returnnumberRandom number
random(1, 5); // -> an integer between 0 and 5 random(5); // -> an integer between 0 and 5 random(1.2, 5.2, true); /// -> a floating-point number between 1.2 and 5.2 復(fù)制代碼

randomBytes

Random bytes generator.

Use crypto module in node or crypto object in browser if possible.

NameTypeDesc
sizenumberNumber of bytes to generate
returnobjectRandom bytes of given length
randomBytes(5); // -> [55, 49, 153, 30, 122] 復(fù)制代碼

range

Create flexibly-numbered lists of integers.

NameTypeDesc
[start]numberStart of the range
endnumberEnd of the range
step=1numberValue to increment or decrement by
range(5); // -> [0, 1, 2, 3, 4] range(0, 5, 2) // -> [0, 2, 4] 復(fù)制代碼

ready

Invoke callback when dom is ready, similar to jQuery ready.

NameTypeDesc
fnfunctionCallback function
ready(function () {// It's safe to manipulate dom here. }); 復(fù)制代碼

reduce

Turn a list of values into a single value.

NameTypeDesc
objobject arrayCollection to iterate over
[iteratee=identity]functionFunction invoked per iteration
[initial]*Initial value
[ctx]*Function context
return*Accumulated value
reduce([1, 2, 3], function (sum, n) { return sum + n }, 0); // -> 6 復(fù)制代碼

reduceRight

Right-associative version of reduce.

reduceRight([[1], [2], [3]], function (a, b) { return a.concat(b) }, []); // -> [3, 2, 1] 復(fù)制代碼

reject

Opposite of filter.

NameTypeDesc
objarrayCollection to iterate over
predicatefunctionFunction invoked per iteration
[ctx]*Predicate context
returnarrayArray of all values that pass predicate
reject([1, 2, 3, 4, 5], function (val) {return val % 2 === 0; }); // -> [1, 3, 5] 復(fù)制代碼

remove

Remove all elements from array that predicate returns truthy for and return an array of the removed elements.

Unlike filter, this method mutates array.

NameTypeDesc
objarrayCollection to iterate over
predicatefunctionFunction invoked per iteration
[ctx]*Predicate context
returnarrayArray of all values that are removed
var arr = [1, 2, 3, 4, 5]; var evens = remove(arr, function (val) { return val % 2 === 0 }); console.log(arr); // -> [1, 3, 5] console.log(evens); // -> [2, 4] 復(fù)制代碼

repeat

Repeat string n-times.

NameTypeDesc
strstringString to repeat
nnumberRepeat times
returnstringRepeated string
repeat('a', 3); // -> 'aaa' repeat('ab', 2); // -> 'abab' repeat('*', 0); // -> '' 復(fù)制代碼

restArgs

This accumulates the arguments passed into an array, after a given index.

NameTypeDesc
functionfunctionFunction that needs rest parameters
startIndexnumberThe start index to accumulates
returnfunctionGenerated function with rest parameters
var paramArr = restArgs(function (rest) { return rest }); paramArr(1, 2, 3, 4); // -> [1, 2, 3, 4] 復(fù)制代碼

rgbToHsl

Convert rgb to hsl.

NameTypeDesc
rgbarrayRgb values
returnarrayHsl values
rgbToHsl([52, 203, 165, 0.8]); // -> [165, 59, 50, 0.8] 復(fù)制代碼

rmCookie

Loop through all possible path and domain to remove cookie.

NameTypeDesc
keystringCookie key
rmCookie('test'); 復(fù)制代碼

rmdir

Recursively remove directories.

NameTypeDesc
dirstringDirectory to remove
callbackfunctionCallback
rmdir('/tmp/foo/bar/baz', function (err) {if (err) console.log (err);else console.log('Done'); }); 復(fù)制代碼

root

Root object reference, global in nodeJs, window in browser.

rpad

Pad string on the right side if it's shorter than length.

NameTypeDesc
strstringString to pad
lennumberPadding length
charsstringString used as padding
returnstringResulted string
rpad('a', 5); // -> 'a ' rpad('a', 5, '-'); // -> 'a----' rpad('abc', 3, '-'); // -> 'abc' rpad('abc', 5, 'ab'); // -> 'abcab' 復(fù)制代碼

rtrim

Remove chars or white-spaces from end of string.

NameTypeDesc
strstringString to trim
charsstring arrayCharacters to trim
returnstringTrimmed string
rtrim(' abc '); // -> ' abc' rtrim('_abc_', '_'); // -> '_abc' rtrim('_abc_', ['c', '_']); // -> '_ab' 復(fù)制代碼

safeCb

Create callback based on input value.

safeDel

Delete object property.

NameTypeDesc
objobjectObject to query
patharray stringPath of property to delete
return*Deleted value or undefined
var obj = {a: {aa: {aaa: 1}}}; safeDel(obj, 'a.aa.aaa'); // -> 1 safeDel(obj, ['a', 'aa']); // -> {} safeDel(obj, 'a.b'); // -> undefined 復(fù)制代碼

safeGet

Get object property, don't throw undefined error.

NameTypeDesc
objobjectObject to query
patharray stringPath of property to get
return*Target value or undefined
var obj = {a: {aa: {aaa: 1}}}; safeGet(obj, 'a.aa.aaa'); // -> 1 safeGet(obj, ['a', 'aa']); // -> {aaa: 1} safeGet(obj, 'a.b'); // -> undefined 復(fù)制代碼

safeSet

Set value at path of object.

If a portion of path doesn't exist, it's created.

NameTypeDesc
objobjectObject to modify
patharray stringPath of property to set
val*Value to set
var obj = {}; safeSet(obj, 'a.aa.aaa', 1); // obj = {a: {aa: {aaa: 1}}} safeSet(obj, ['a', 'aa'], 2); // obj = {a: {aa: 2}} safeSet(obj, 'a.b', 3); // obj = {a: {aa: 2, b: 3}} 復(fù)制代碼

safeStorage

Use storage safely in safari private browsing and older browsers.

NameTypeDesc
[type='local']stringlocal or session
returnobjectSpecified storage
var localStorage = safeStorage('local'); localStorage.setItem('licia', 'util'); 復(fù)制代碼

sample

Sample random values from a collection.

NameTypeDesc
objarray objectCollection to sample
nnumberNumber of values
returnarrayArray of sample values
sample([2, 3, 1], 2); // -> [2, 3] sample({a: 1, b: 2, c: 3}, 1); // -> [2] 復(fù)制代碼

scrollTo

Scroll to a target with animation.

NameTypeDesc
targetelement string numberScroll target
optionsobjectScroll options

Options

NameTypeDefaultDesc
tolerancenumber0Tolerance of target to scroll
durationnumber800Scroll duration
easingstring functionoutQuartEasing function
callbackfunctionnoopFunction to run once scrolling complete
scrollTo('body', {tolerance: 0,duration: 800,easing: 'outQuart',callback: function () {} }); 復(fù)制代碼

selectionSort

Selection sort implementation.

NameTypeDesc
arrarrayArray to sort
[cmp]functionComparator
selectionSort([2, 1]); // -> [1, 2] 復(fù)制代碼

shuffle

Randomize the order of the elements in a given array.

NameTypeDesc
arrarrayArray to randomize
returnarrayRandomized Array
shuffle([1, 2, 3]); // -> [3, 1, 2] 復(fù)制代碼

size

Get size of object, length of array like object or the number of keys.

NameTypeDesc
objarray objectCollection to inspect
returnnumberCollection size
size({a: 1, b: 2}); // -> 2 size([1, 2, 3]); // -> 3 復(fù)制代碼

slice

Create slice of source array or array-like object.

NameTypeDesc
arrayarrayArray to slice
[start=0]numberStart position
[end=array.length]numberEnd position, not included
slice([1, 2, 3, 4], 1, 2); // -> [2] 復(fù)制代碼

snakeCase

Convert string to "snakeCase".

NameTypeDesc
strstringString to convert
returnstringSnake cased string
snakeCase('fooBar'); // -> foo_bar snakeCase('foo bar'); // -> foo_bar snakeCase('foo.bar'); // -> foo_bar 復(fù)制代碼

some

Check if predicate return truthy for any element.

NameTypeDesc
objarray objectCollection to iterate over
predicatefunctionFunction to invoked per iteration
ctx*Predicate context
returnbooleanTrue if any element passes the predicate check
some([2, 5], function (val) {return val % 2 === 0; }); // -> true 復(fù)制代碼

spaceCase

Convert string to "spaceCase".

NameTypeDesc
strstringString to convert
returnstringSpace cased string
spaceCase('fooBar'); // -> foo bar spaceCase('foo.bar'); // -> foo bar spaceCase('foo.bar'); // -> foo bar 復(fù)制代碼

splitCase

Split different string case to an array.

NameTypeDesc
strstringString to split
returnarrayResult array
splitCase('foo-bar'); // -> ['foo', 'bar'] splitCase('foo bar'); // -> ['foo', 'bar'] splitCase('foo_bar'); // -> ['foo', 'bar'] splitCase('foo.bar'); // -> ['foo', 'bar'] splitCase('fooBar'); // -> ['foo', 'bar'] splitCase('foo-Bar'); // -> ['foo', 'bar'] 復(fù)制代碼

splitPath

Split path into device, dir, name and ext.

NameTypeDesc
pathstringPath to split
returnobjectObject containing dir, name and ext
splitPath('f:/foo/bar.txt'); // -> {dir: 'f:/foo/', name: 'bar.txt', ext: '.txt'} splitPath('/home/foo/bar.txt'); // -> {dir: '/home/foo/', name: 'bar.txt', ext: '.txt'} 復(fù)制代碼

startWith

Check if string starts with the given target string.

NameTypeDesc
strstringString to search
prefixstringString prefix
returnbooleanTrue if string starts with prefix
startWith('ab', 'a'); // -> true 復(fù)制代碼

strHash

String hash function using djb2.

NameTypeDesc
strstringString to hash
returnnumberHash result
strHash('test'); // -> 2090770981 復(fù)制代碼

stringify

JSON stringify with support for circular object, function etc.

Undefined is treated as null value.

NameTypeDesc
objobjectObject to stringify
spacesnumberIndent spaces
returnstringStringified object
stringify({a: function () {}}); // -> '{"a":"[Function function () {}]"}' var obj = {a: 1}; obj.b = obj; stringify(obj); // -> '{"a":1,"b":"[Circular ~]"}' 復(fù)制代碼

stripAnsi

Strip ansi codes from a string.

NameTypeDesc
strstringString to strip
returnstringResulted string
stripAnsi('\u001b[4mcake\u001b[0m'); // -> 'cake' 復(fù)制代碼

stripCmt

Strip comments from source code.

NameTypeDesc
strstringSource code
returnstringCode without comments
stripCmts('// comment \n var a = 5; /* comment2\n * comment3\n *\/'); // -> ' var a = 5; ' 復(fù)制代碼

stripColor

Strip ansi color codes from a string.

NameTypeDesc
strstringString to strip
returnstringResulted string
stripColor('\u001b[31mred\u001b[39m'); // -> 'red' 復(fù)制代碼

stripHtmlTag

Strip html tags from a string.

NameTypeDesc
strstringString to strip
returnstringResulted string
stripHtmlTag('<p>Hello</p>'); // -> 'Hello' 復(fù)制代碼

sum

Compute sum of given numbers.

NameTypeDesc
...numnumberNumbers to calculate
returnnumberSum of numbers
sum(1, 2, 5); // -> 8 復(fù)制代碼

template

Compile JavaScript template into function that can be evaluated for rendering.

NameTypeString
strstringTemplate string
returnfunctionCompiled template function
template('Hello <%= name %>!')({name: 'licia'}); // -> 'Hello licia!' template('<p><%- name %></p>')({name: '<licia>'}); // -> '<p>&lt;licia&gt;</p>' template('<%if (echo) {%>Hello licia!<%}%>')({echo: true}); // -> 'Hello licia!' 復(fù)制代碼

throttle

Return a new throttled version of the passed function.

NameTypeDesc
fnfunctionFunction to throttle
waitnumberNumber of milliseconds to delay
returnfunctionNew throttled function
$(window).scroll(throttle(updatePos, 100)); 復(fù)制代碼

through

Tiny wrapper of stream Transform.

NameTypeDesc
[opts={}]ObjectOptions to initialize stream
transformfunctionTransform implementation
[flush]functionFlush implementation

obj

Shortcut for setting objectMode to true.

ctor

Return a class that extends stream Transform.

fs.createReadStream('in.txt').pipe(through(function (chunk, enc, cb){// Do something to chunkthis.push(chunk);cb();})).pipe(fs.createWriteStream('out.txt')); 復(fù)制代碼

timeAgo

Format datetime with *** time ago statement.

NameTypeDesc
dateDateDate to calculate
[now=new Date]DateCurrent date
returnstringFormatted time ago string
var now = new Date().getTime(); timeAgo(now - 1000 * 6); // -> right now timeAgo(now + 1000 * 15); // -> in 15 minutes timeAgo(now - 1000 * 60 * 60 * 5, now); // -> 5 hours ago 復(fù)制代碼

timeTaken

Get execution time of a function.

NameTypeDesc
fnfunctionFunction to measure time
returnnumberExecution time, ms
timeTaken(function () {// Do something. }); // -> Time taken to execute given function. 復(fù)制代碼

toArr

Convert value to an array.

NameTypeDesc
val*Value to convert
returnarrayConverted array
toArr({a: 1, b: 2}); // -> [{a: 1, b: 2}] toArr('abc'); // -> ['abc'] toArr(1); // -> [1] toArr(null); // -> [] 復(fù)制代碼

toBool

Convert value to a boolean.

NameTypeDesc
val*Value to convert
returnbooleanConverted boolean
toBool(true); // -> true toBool(null); // -> false toBool(1); // -> true toBool(0); // -> false toBool('0'); // -> false toBool('1'); // -> true toBool('false'); // -> false 復(fù)制代碼

toDate

Convert value to a Date.

NameTypeDesc
val*Value to convert
returnDateConverted Date
toDate('20180501'); toDate('2018-05-01'); toDate(1525107450849); 復(fù)制代碼

toEl

Convert html string to dom elements.

There should be only one root element.

NameTypeDesc
strstringHtml string
returnelementHtml element
toEl('<div>test</div>'); 復(fù)制代碼

toInt

Convert value to an integer.

NameTypeDesc
val*Value to convert
returnnumberConverted integer
toInt(1.1); // -> 1 toInt(undefined); // -> 0 復(fù)制代碼

toNum

Convert value to a number.

NameTypeDesc
val*Value to process
returnnumberResulted number
toNum('5'); // -> 5 復(fù)制代碼

toSrc

Convert function to its source code.

NameTypeDesc
fnfunctionFunction to convert
returnstringSource code
toSrc(Math.min); // -> 'function min() { [native code] }' toSrc(function () {}) // -> 'function () { }' 復(fù)制代碼

toStr

Convert value to a string.

NameTypeDesc
val*Value to convert
returnstringResulted string
toStr(null); // -> '' toStr(1); // -> '1' toStr(false); // -> 'false' toStr([1, 2, 3]); // -> '1,2,3' 復(fù)制代碼

topoSort

Topological sorting algorithm.

NameTypeDesc
edgesarrayDependencies
returnarraySorted order
topoSort([[1, 2], [1, 3], [3, 2]]); // -> [1, 3, 2] 復(fù)制代碼

trigger

Trigger browser events.

NameTypeDesc
[el=document]elementElement to trigger
typestringEvent type
optsobjectOptions
trigger(el, 'mouseup'); trigger('keydown', {keyCode: 65}); 復(fù)制代碼

trim

Remove chars or white-spaces from beginning end of string.

NameTypeDesc
strstringString to trim
charsstring arrayCharacters to trim
returnstringTrimmed string
trim(' abc '); // -> 'abc' trim('_abc_', '_'); // -> 'abc' trim('_abc_', ['a', 'c', '_']); // -> 'b' 復(fù)制代碼

tryIt

Run function in a try catch.

NameTypeDesc
fnfunctionFunction to try catch
[cb]functionCallback
tryIt(function () {// Do something that might cause an error. }, function (err, result) {if (err) console.log(err); }); 復(fù)制代碼

type

Determine the internal JavaScript [[Class]] of an object.

NameTypeDesc
val*Value to get type
returnstringType of object, lowercased
type(5); // -> 'number' type({}); // -> 'object' type(function () {}); // -> 'function' type([]); // -> 'array' 復(fù)制代碼

ucs2

UCS-2 encoding and decoding.

encode

Create a string using an array of code point values.

NameTypeDesc
arrarrayArray of code points
returnstringEncoded string

decode

Create an array of code point values using a string.

NameTypeDesc
strstringInput string
returnarrayArray of code points
ucs2.encode([0x61, 0x62, 0x63]); // -> 'abc' ucs2.decode('abc'); // -> [0x61, 0x62, 0x63] '?'.length; // -> 2 ucs2.decode('?').length; // -> 1 復(fù)制代碼

unescape

Convert HTML entities back, the inverse of escape.

NameTypeDesc
strstringString to unescape
returnstringunescaped string
unescape('You &amp; Me'); -> // -> 'You & Me' 復(fù)制代碼

union

Create an array of unique values, in order, from all given arrays.

NameTypeDesc
...arrarrayArrays to inspect
returnarrayNew array of combined values
union([2, 1], [4, 2], [1, 2]); // -> [2, 1, 4] 復(fù)制代碼

uniqId

Generate a globally-unique id.

NameTypeDesc
prefixstringId prefix
returnstringGlobally-unique id
uniqId('eusita_'); // -> 'eustia_xxx' 復(fù)制代碼

unique

Create duplicate-free version of an array.

NameTypeDesc
arrarrayArray to inspect
[compare]functionFunction for comparing values
returnarrayNew duplicate free array
unique([1, 2, 3, 1]); // -> [1, 2, 3] 復(fù)制代碼

unzip

Opposite of zip.

NameTypeDesc
arrarrayArray of grouped elements to process
returnarrayNew array of regrouped elements
unzip([['a', 1, true], ['b', 2, false]]); // -> [['a', 'b'], [1, 2], [true, false]] 復(fù)制代碼

upperCase

Convert string to upper case.

NameTypeDesc
strstringString to convert
returnstringUppercased string
upperCase('test'); // -> 'TEST' 復(fù)制代碼

upperFirst

Convert the first character of string to upper case.

NameTypeDesc
strstringString to convert
returnstringConverted string
upperFirst('red'); // -> Red 復(fù)制代碼

use

Use modules that is created by define.

NameTypeDesc
[requires]arrayDependencies
methodfunctionCodes to be executed
define('A', function () {return 'A'; }); use(['A'], function (A) {console.log(A + 'B'); // -> 'AB' }); 復(fù)制代碼

utf8

UTF-8 encoding and decoding.

encode

Turn any UTF-8 decoded string into UTF-8 encoded string.

NameTypeDesc
strstringString to encode
returnstringEncoded string

decode

NameTypeDesc
strstringString to decode
[safe=false]booleanSuppress error if true
returnstringDecoded string

Turn any UTF-8 encoded string into UTF-8 decoded string.

utf8.encode('\uD800\uDC00'); // -> '\xF0\x90\x80\x80' utf8.decode('\xF0\x90\x80\x80'); // -> '\uD800\uDC00' 復(fù)制代碼

uuid

RFC4122 version 4 compliant uuid generator.

Check RFC4122 4.4 for reference.

uuid(); // -> '53ce0497-6554-49e9-8d79-347406d2a88b' 復(fù)制代碼

values

Create an array of the own enumerable property values of object.

NameTypeDesc
objobjectObject to query
returnarrayArray of property values
values({one: 1, two: 2}); // -> [1, 2] 復(fù)制代碼

viewportScale

Get viewport scale.

viewportScale(); // -> 3 復(fù)制代碼

waterfall

Run an array of functions in series.

NameTypeDesc
tasksarrayArray of functions
[cb]functionCallback once completed
waterfall([function (cb){cb(null, 'one');},function (arg1, cb){// arg1 -> 'one'cb(null, 'done');} ], function (err, result) {// result -> 'done' }); 復(fù)制代碼

workerize

Move a stand-alone function to a worker thread.

NameTypeDesc
fnfunctionFunction to turn
returnfunctionWorkerized Function
workerize(function (a, b) {return a + b; }); workerize(1, 2).then(function (value) {console.log(value); // -> 3 }); 復(fù)制代碼

wrap

Wrap the function inside a wrapper function, passing it as the first argument.

NameTypeDesc
fn*Function to wrap
wrapperfunctionWrapper function
returnfunctionNew function
var p = wrap(escape, function(fn, text) {return '<p>' + fn(text) + '</p>'; }); p('You & Me'); // -> '<p>You &amp; Me</p>' 復(fù)制代碼

zip

Merge together the values of each of the arrays with the values at the corresponding position.

NameTypeDesc
*arrarrayArrays to process
returnarrayNew array of grouped elements
zip(['a', 'b'], [1, 2], [true, false]); // -> [['a', 1, true], ['b', 2, false]] 復(fù)制代碼

轉(zhuǎn)載于:https://juejin.im/post/5af04752f265da0b873a6e6a

總結(jié)

以上是生活随笔為你收集整理的Licia:最全最实用的 JavaScript 工具库的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

最新的av网站 | 国产小视频在线观看 | 在线视频观看亚洲 | av在线播放中文字幕 | 99热在线观看 | 久久久天堂 | 96av麻豆蜜桃一区二区 | 日韩乱理 | 麻豆免费在线视频 | 麻豆av电影 | 麻豆精品国产传媒 | 免费高清看电视网站 | 成年人网站免费在线观看 | 国产一线二线三线性视频 | 亚洲欧洲国产精品 | 欧美日韩aa | 少妇bbbb揉bbbb日本 | 色综合久久久网 | 69国产盗摄一区二区三区五区 | 免费毛片一区二区三区久久久 | 亚洲天堂网在线播放 | 日日夜操 | 91精品国自产在线观看欧美 | 美女网站在线观看 | 91在线看黄| 青青草在久久免费久久免费 | 亚洲春色成人 | 欧美久久影院 | 91成人午夜 | 九九久久电影 | 91视频免费看网站 | 免费观看一区 | 黄色一级片视频 | 91日韩精品| a天堂最新版中文在线地址 久久99久久精品国产 | 最近中文字幕免费观看 | 亚洲国产综合在线 | 日韩精品免费一线在线观看 | 99热 精品在线 | 欧美日韩不卡一区二区三区 | 伊人五月天综合 | 国产玖玖在线 | 99国产视频 | 天天久久综合 | 亚洲日本精品 | 日韩激情视频在线观看 | 色偷偷97 | 五月婷婷一级片 | 亚洲精品国产综合久久 | 国产精品久久久久久影院 | 成人午夜在线观看 | 97热在线观看 | 国产va饥渴难耐女保洁员在线观看 | 国内精品久久久久久久影视麻豆 | 色婷婷综合久久久久中文字幕1 | 99久久超碰中文字幕伊人 | 久草在线最新免费 | 四虎8848免费高清在线观看 | 亚洲国产三级在线观看 | 九九视频免费观看视频精品 | 一区在线免费观看 | 中文字幕在线观看视频一区二区三区 | 999超碰| 日韩欧美在线一区二区 | 成人亚洲免费 | 日韩在线免费电影 | 免费av黄色 | 国产精品久久av | 一区二区三区影院 | 免费看污网站 | 91网站观看| 中文字幕资源网 | 国产免费中文字幕 | 久久精品视频在线免费观看 | 亚洲精品国偷自产在线91正片 | 2019天天干天天色 | 久久1区 | 精品国产1区2区3区 国产欧美精品在线观看 | 国产午夜av | 天天操天天干天天 | 国产精品v欧美精品v日韩 | 日本黄色大片儿 | 日韩一二三区不卡 | 亚洲国产三级在线观看 | 色综合五月天 | 欧美日韩视频免费 | 国产精品视频免费在线观看 | 人人爽人人片 | 免费在线激情电影 | 六月丁香久久 | 亚洲精品视频在线观看免费视频 | 国产高清在线免费 | 国产成人精品999在线观看 | 97精产国品一二三产区在线 | 亚洲一区美女视频在线观看免费 | 免费黄色一区 | 色欧美88888久久久久久影院 | 精品一区 在线 | 久久精品国产精品亚洲精品 | 欧美在线观看视频免费 | 国产精品一区二区久久久 | 五月开心婷婷网 | 欧美精品xxx | 最近更新好看的中文字幕 | 日韩av在线看| 精品免费久久久久 | 91在线视频| 欧美性另类 | 亚洲欧美日韩在线一区二区 | 成人免费视频在线观看 | 麻豆成人在线观看 | 久久久久久久久久伊人 | 久久久综合九色合综国产精品 | www天天干 | 免费三级黄 | 亚洲国产精品推荐 | 欧美性色网站 | 国产精品完整版 | 激情图片区 | 久久久久亚洲精品成人网小说 | 中中文字幕av | 天天干视频在线 | 日韩一区二区三区在线看 | 91网站在线视频 | 亚洲另类视频 | 最新国产精品拍自在线播放 | 日韩在线观看中文字幕 | 91麻豆精品一区二区三区 | 在线视频99 | 久久精品视频18 | 久久精品免费电影 | 蜜桃av人人夜夜澡人人爽 | av一区二区在线观看中文字幕 | 91成人精品一区在线播放 | 在线观看av片 | 热久久电影 | 天天操婷婷 | 免费一级日韩欧美性大片 | 日韩免费av网址 | 国产精品视频永久免费播放 | 美女网色 | 精品美女在线视频 | 91人人插 | 欧美黄色成人 | 四虎8848免费高清在线观看 | 亚洲观看黄色网 | 久久www免费人成看片高清 | 亚洲欧美日韩一二三区 | 国产精品av在线 | 草樱av| 久久精品网站视频 | 日韩精品1区2区 | 日韩色在线观看 | 国内精品久久天天躁人人爽 | 99久久精品国产一区二区三区 | 日本黄色黄网站 | 国产毛片在线 | 人人天天夜夜 | 国产精品永久免费在线 | 欧美国产日韩激情 | 欧美大香线蕉线伊人久久 | 在线免费av网 | 亚洲国产精品久久久 | 蜜臀久久99静品久久久久久 | 天天摸天天操天天爽 | 丁香激情综合久久伊人久久 | 日韩字幕 | 91福利视频久久久久 | 激情婷婷亚洲 | 毛片精品免费在线观看 | 精品国产资源 | 中文在线a在线 | 麻花豆传媒一二三产区 | 成人在线一区二区 | 中文字幕精品在线 | 久久国产美女视频 | 亚洲精品视频在线免费 | 国产不卡免费视频 | av免费看在线| 在线观看久| 色六月婷婷 | 五月激情六月丁香 | 日韩久久久久久久久 | 黄色电影在线免费观看 | 麻豆影视在线免费观看 | 中文字幕一区二区三区在线视频 | 又大又硬又黄又爽视频在线观看 | 激情欧美一区二区三区 | 亚洲人天堂 | 色婷婷电影 | 国内久久精品视频 | 99精品一区二区 | 中文国产在线观看 | 欧美成人影音 | 国产一级黄色av | 在线导航av | 国际精品久久久久 | www.夜夜爱 | 少妇性aaaaaaaaa视频 | 欧美日韩一区二区三区在线观看视频 | 欧美日韩在线观看一区 | 国产精品99久久久久久久久久久久 | 亚洲一级久久 | 亚洲国产精品va在线看黑人动漫 | 一级黄色片毛片 | 国产精品久久久久久久久毛片 | 亚洲精品在线观看视频 | 在线免费观看黄 | 色悠悠久久综合 | 色欧美视频 | 亚洲va韩国va欧美va精四季 | 久久人视频| 激情久久久久 | 在线免费观看的av | 欧美成年网站 | 久久一区国产 | 亚洲精品mv在线观看 | 日韩av一区在线观看 | 天天草天天干天天 | 久久国产成人午夜av影院宅 | 婷婷色综合网 | 中文字幕在线免费播放 | 国产精品都在这里 | 免费色av| 亚洲精品综合在线观看 | 日韩欧美在线综合网 | 亚洲影视九九影院在线观看 | 久久久久免费精品视频 | 免费国产ww| 日韩视频1 | www亚洲国产| www.夜夜爱| 亚洲影院国产 | 深夜免费福利视频 | 亚洲欧洲精品一区二区精品久久久 | 精品久久久久一区二区国产 | 国产日韩一区在线 | 一区在线播放 | 日韩欧美综合在线视频 | 国产在线永久 | 久久综合九色综合欧美狠狠 | 欧美日韩一区二区三区免费视频 | 国产亚洲欧美日韩高清 | 国产久草在线 | 国产录像在线观看 | 亚洲视频一区二区三区在线观看 | 国产成人精品一区二 | av网在线观看 | 成人久久久久 | 午夜av一区| 九九亚洲视频 | 在线你懂的视频 | 亚洲va综合va国产va中文 | 亚洲黄色av网址 | 色综合久久悠悠 | 国产中文字幕国产 | 亚洲精品乱码久久久久久9色 | 亚洲精品系列 | 天无日天天操天天干 | 日韩免费b | 三级av黄色 | 亚洲日本精品视频 | 日韩久久片 | 精品国产视频在线 | 天天射天天射 | 激情五月婷婷激情 | 四虎影视成人精品国库在线观看 | 超碰人人在线观看 | 人人爽人人看 | 国产精品理论视频 | 一区在线电影 | 欧美巨大 | 婷婷丁香花 | 天天操偷偷干 | 久久国产精品99久久久久久老狼 | 久久精品视频18 | 日日爽| 天天综合网入口 | 91入口在线观看 | 丁香色综合 | 天天操天天透 | 六月丁香综合 | 亚洲午夜久久久久久久久久久 | 日日爽天天爽 | 中文字幕91视频 | 人人射网站 | 亚洲国产精品va在线看黑人 | 99久久精品无免国产免费 | 91视频久久久久久 | 色婷婷电影 | 精品国产免费一区二区三区五区 | 国产三级国产精品国产专区50 | 国际精品久久 | 中文字幕日韩无 | 天天干人人干 | 蜜臀精品久久久久久蜜臀 | www久草 | 亚洲国产播放 | 五月婷婷丁香综合 | 久久久黄视频 | 怡红院av久久久久久久 | 国产免码va在线观看免费 | 国产a国产a国产a | 成人黄色中文字幕 | 久久久综合精品 | 91精品视频观看 | 日韩美女免费线视频 | 美女视频一区 | 国产精品网红直播 | 国产午夜精品视频 | 久久国产成人午夜av影院潦草 | 奇米影音四色 | 伊香蕉大综综综合久久啪 | 国产精品网红直播 | 天天超碰 | 欧美不卡视频在线 | 亚洲黄色片 | 国产区在线 | 国产日本三级 | 黄色在线看网站 | 亚洲免费永久精品国产 | av资源在线看 | 国产亚洲精品久久久久久大师 | 国产午夜三级一区二区三 | 亚洲mv大片欧洲mv大片免费 | 天天操夜夜想 | 久久好看 | 日韩精品视频一二三 | www.色五月.com| 国产精品一区二区三区在线播放 | 国内偷拍精品视频 | 亚洲涩涩涩 | 毛片网在线观看 | 五月婷婷.com | 黄色aa久久 | 免费进去里的视频 | 免费看v片网站 | 在线免费观看视频一区二区三区 | 国产乱对白刺激视频在线观看女王 | 国产中文字幕视频 | 中文字幕综合在线 | av导航福利 | 国产美女精品在线 | 午夜精品久久一牛影视 | 亚洲精品国内 | 少妇做爰k8经典 | 国产中文| 日韩av影视在线观看 | 欧美福利网站 | 久久er99热精品一区二区三区 | 热99久久精品 | 99热在线观看 | 中文国产字幕 | 天天综合色网 | 一级特黄aaa大片在线观看 | 尤物九九久久国产精品的分类 | 色妞色视频一区二区三区四区 | 亚洲成人资源在线 | 久久国产精品久久国产精品 | 国产资源免费 | 天天综合在线观看 | 不卡日韩av| 国产九九九九九 | 在线视频电影 | 欧美精品中文在线免费观看 | 免费在线观看av网址 | 天天曰| 久久久精品网站 | www.com久久久| 午夜精品电影 | 久久久黄色免费网站 | 色婷婷激婷婷情综天天 | 久久久福利影院 | 99精品偷拍视频一区二区三区 | 天天射网 | 经典三级一区 | a视频在线看 | 欧美性黄网官网 | 久久精品99国产精品日本 | www.色国产| 在线国产一区二区 | 国精产品999国精产品岳 | 精品三级av | 蜜桃视频在线观看一区 | 亚洲精品字幕在线观看 | 91最新国产| 国产一级高清视频 | 人人超碰人人 | 色综合天 | 日韩综合在线观看 | 免费男女网站 | 综合久久婷婷 | 韩国av免费观看 | 欧美a级免费视频 | 96视频免费在线观看 | 亚洲天天做 | 色窝资源 | av一区二区三区在线 | 超碰人人乐| 久久久精品电影 | 99av在线视频 | 久久精品国产免费观看 | 日韩av免费大片 | 日本三级国产 | 久久午夜电影院 | 欧美日本一二三 | 丁香激情五月 | 99精品免费网 | 美女视频黄是免费的 | 超碰官网 | 日韩精品在线观看av | 91九色免费视频 | 亚洲干 | 久久大香线蕉app | av女优中文字幕在线观看 | 欧美少妇影院 | 久亚洲 | 九九热免费精品视频 | 99热这里只有精品在线观看 | 亚洲日本韩国一区二区 | 免费激情在线电影 | 丰满少妇在线观看资源站 | 在线天堂v| 亚洲电影影音先锋 | 久久免费看av | 国内精品久久久久久久久 | 91视频午夜 | 久久久毛片| 91成人网页版 | 日韩在线免费看 | 日韩av免费在线看 | 日韩理论在线播放 | 美女禁18| 久久精品欧美一区二区三区麻豆 | 免费高清在线视频一区· | 亚洲精品乱码久久久久久蜜桃91 | 欧美一级电影片 | 国产极品尤物在线 | 久久久久免费电影 | 在线视频手机国产 | 亚洲影视资源 | 欧美日韩亚洲第一页 | 免费看的视频 | 国产精品久久99综合免费观看尤物 | 日产av在线播放 | 最近中文字幕完整视频高清1 | 色av婷婷| 国产中年夫妇高潮精品视频 | 永久免费毛片在线观看 | 狠狠色丁香婷婷综合久小说久 | 97视频免费在线观看 | 丁香五香天综合情 | 久久另类小说 | 欧美日韩一区二区三区免费视频 | av电影中文字幕 | 免费视频久久久 | 亚洲精品免费视频 | 日本激情视频中文字幕 | 欧美一级片播放 | 国产精品福利av | 久久国产一区二区 | 天天操天天操天天爽 | 国产成人一级 | 成人黄色国产 | 亚洲观看黄色网 | 天天天天爽 | 天天操操 | 黄色成人91 | 热久久免费视频 | 精品亚洲一区二区三区 | 91在线精品秘密一区二区 | 日韩欧美高清视频在线观看 | 色在线视频 | 亚洲欧洲av在线 | 一区二区三区手机在线观看 | 久久亚洲视频 | 国产视频在线观看一区 | 黄色av网站在线观看 | 一区二区欧美激情 | 91av原创| 一级黄色电影网站 | 国产精品午夜8888 | 亚洲最新视频在线播放 | 亚洲精品综合在线观看 | 精品国产一区二区三区av性色 | 波多野结衣动态图 | 五月天com | 久久综合九色99 | 手机版av在线| 久艹在线免费观看 | 99精品区 | 黄色免费电影网站 | 亚洲欧美日韩国产一区二区三区 | 精品在线免费观看 | 成人av一级片| 波多野结衣亚洲一区二区 | 欧美夫妻性生活电影 | 亚洲最大的av网站 | 亚洲综合狠狠干 | 日日夜夜天天久久 | 韩国精品福利一区二区三区 | av电影中文字幕在线观看 | 欧美 激情 国产 91 在线 | 十八岁以下禁止观看的1000个网站 | 天天天色综合a | 日韩特级毛片 | 国产又粗又猛又黄又爽 | 在线国产精品视频 | 免费看wwwwwwwwwww的视频 久久久久久99精品 91中文字幕视频 | 免费欧美高清视频 | 欧美-第1页-屁屁影院 | av 一区二区三区四区 | 色七七亚洲影院 | 在线观看完整版 | 色视频网站免费观看 | 久久爱综合 | 久久精品8 | 国产又粗又长又硬免费视频 | 91在线影视| 在线免费看黄网站 | 成人影片免费 | 夜夜夜| 日韩在线视频线视频免费网站 | 四虎成人精品永久免费av | 免费在线精品视频 | 国产综合香蕉五月婷在线 | 欧美日韩国产在线精品 | 天天干天天上 | 六月丁香婷婷网 | 国产精品久久久区三区天天噜 | 91视频高清完整版 | 国产精品丝袜久久久久久久不卡 | 成年免费在线视频 | 永久免费av在线播放 | 丝袜+亚洲+另类+欧美+变态 | 国产成人333kkk | 久久在线免费观看视频 | 日韩电影中文字幕 | 国产中文字幕亚洲 | 久草手机视频 | 亚洲电影图片小说 | 不卡av电影在线观看 | 免费观看一区 | 六月激情 | 日韩电影久久 | 国产精品午夜久久 | 99r在线 | adc在线观看 | 国产 欧美 在线 | 国产无区一区二区三麻豆 | 精品自拍av| 日韩精品三区四区 | 免费久久久久久 | 久久伊人操 | 天天操福利视频 | 99久久婷婷国产综合亚洲 | 三级黄色在线 | 天堂在线视频中文网 | 国产精品亚洲视频 | 草久电影| 欧美性大战 | 亚洲国产福利视频 | 日日弄天天弄美女bbbb | 国产麻豆精品一区 | 日韩成人在线免费观看 | 香蕉在线影院 | 欧美日韩精品在线视频 | a级国产乱理伦片在线观看 亚洲3级 | 在线看一区二区 | 国产精品一区在线观看 | 一区二区三区视频在线 | 欧美极品少妇xxxx | 免费观看完整版无人区 | 欧美国产高清 | 午夜精品久久久久 | 91视频免费视频 | 国产精品久久久网站 | 在线观看v片 | 人人插人人 | 久久中文字幕视频 | 国产亚洲精品福利 | 四虎www. | 亚洲精品永久免费视频 | 美女久久久久久久 | 亚洲 欧洲 国产 日本 综合 | 中文日韩在线视频 | 欧美乱熟臀69xxxxxx | 就操操久久 | 欧美日韩午夜爽爽 | av中文在线观看 | 国产精品123 | av成人亚洲| 玖玖视频国产 | 欧美激精品 | 久草在线免费在线观看 | 亚洲欧洲美洲av | 天天操天天弄 | av电影免费观看 | 免费看成年人 | 久久久久久久久久网站 | 久久国产a | 日本久久成人中文字幕电影 | 欧美日韩色婷婷 | 免费看黄的 | 欧洲视频一区 | 国产精品一区二区久久久久 | 久久超碰97| 日韩精品电影在线播放 | 欧美成人中文字幕 | 欧美有色 | 久久噜噜少妇网站 | 久草在线视频免赞 | 成人亚洲网| 国产在线观看,日本 | 久热av在线| 一二三区视频在线 | 亚洲成a人片综合在线 | 中文亚洲欧美日韩 | 日产乱码一二三区别免费 | 999男人的天堂 | 久久久久久久综合色一本 | 欧美精品久久久久久久免费 | 国产69精品久久久久99 | 久久a v电影| 久久99国产精品自在自在app | 日韩欧美一区二区三区黑寡妇 | 在线免费试看 | 日韩乱码在线 | 在线视频你懂 | 中文电影网 | 国产精品午夜久久 | 韩国一区二区av | 欧美日韩国产页 | www.99热精品| av网站有哪些 | 日本精品久久久一区二区三区 | 黄网站免费看 | 亚洲激情中文 | 国产一级二级三级视频 | 国产精品久久久久久久久久ktv | 国产精品刺激对白麻豆99 | 国产精品美女视频 | 少妇bbw搡bbbb搡bbbb | 久久99网站 | 天天操天天射天天添 | 久久超| 欧美成人黄色 | 粉嫩av一区二区三区四区 | 99精品视频免费看 | 亚洲欧美一区二区三区孕妇写真 | 人人插人人看 | 懂色av一区二区在线播放 | 色在线最新 | 99精品美女| 成人午夜精品 | 密桃av在线 | 亚洲国产视频直播 | 欧美日韩在线免费观看视频 | 337p西西人体大胆瓣开下部 | 三上悠亚一区二区在线观看 | 亚洲精品国产综合99久久夜夜嗨 | 91色在线观看 | 成人毛片久久 | 97在线精品国自产拍中文 | 粉嫩av一区二区三区入口 | 国产一卡久久电影永久 | 欧美激情精品一区 | 国产理论一区二区三区 | 亚洲天堂精品视频 | 99久久久久成人国产免费 | 国产高清视频在线播放 | 黄a在线看 | 丁香视频免费观看 | 久久精品这里都是精品 | 亚洲禁18久人片 | 四虎成人网 | 最新超碰在线 | 久久av免费观看 | 久久精品一二区 | 午夜黄色大片 | 中文字幕刺激在线 | 91亚·色| 国内精品久久久久国产 | 91高清一区| 国产精品白丝av | 公与妇乱理三级xxx 在线观看视频在线观看 | 99视频免费播放 | 午夜精品av在线 | 久久欧美视频 | 黄色高清视频在线观看 | 一区二区影视 | 九九电影在线 | 亚洲性xxxx | 日韩一级电影在线观看 | 久久99视频 | 一区二区国产精品 | 色婷婷亚洲精品 | 亚洲播播 | 99热在线国产 | 精品影院一区二区久久久 | 中文在线a在线 | 国产日韩视频在线观看 | 日韩av成人在线 | 一区二区视频在线观看免费 | 激情欧美xxxx| 在线你懂的视频 | 天天草综合网 | 国产专区视频在线观看 | 日韩在线免费视频 | 日本天天操 | 国产分类视频 | 韩国av一区二区三区在线观看 | 91精品在线播放 | 亚洲精品在线视频网站 | 日韩精品中字 | www黄免费 | 91九色视频国产 | 超碰最新网址 | 一区国产精品 | 在线亚州 | 亚洲女欲精品久久久久久久18 | 在线免费看片 | 欧洲视频一区 | 在线久草视频 | 2023av在线 | 美女av免费 | 九九综合久久 | 天天综合网 天天综合色 | 日韩精品久久中文字幕 | 最新国产福利 | 国产精品18久久久久久vr | 在线观看 国产 | 在线视频麻豆 | 亚洲精品综合欧美二区变态 | 在线天堂中文www视软件 | 大胆欧美gogo免费视频一二区 | 日韩在线视频网址 | 国产精品毛片一区视频播 | 91视频免费播放 | 亚洲精品午夜aaa久久久 | 久草视频在线播放 | 亚洲视频在线免费观看 | 麻豆 91 在线| 亚州欧美视频 | 6699私人影院| 免费观看一级视频 | 国产精品一区二区电影 | 国产精品h在线观看 | 欧美另类人妖 | 美女久久久久久 | 悠悠av资源片 | 日韩精品2区 | 国产精品成久久久久 | 国产自制av| 最新日韩在线观看视频 | 伊人春色电影网 | 日韩成人精品在线观看 | 人人澡人人干 | 国内精品久久天天躁人人爽 | 欧美夫妻性生活电影 | 人人舔人人干 | 久久成人国产精品一区二区 | 亚洲国产精品第一区二区 | 亚洲黄色片在线 | 午夜精品电影 | 福利一区二区三区四区 | 色噜噜在线观看视频 | 中文字字幕在线 | 久久免费视频国产 | av网址最新 | 免费看的av片 | 国产精品毛片一区视频 | 国产精品视频线看 | 青春草免费在线视频 | 97在线视频网站 | 国产91亚洲 | 免费裸体视频网 | 国产美女久久久 | 午夜成人免费电影 | 成人在线观看网址 | 天天操天天干天天操天天干 | 欧美性爽爽 | 午夜影院三级 | 中文字幕在线播放日韩 | 99久久精品免费看国产一区二区三区 | 中文字幕在线观看视频免费 | 狠狠色丁香婷婷综合久久片 | 亚洲精品国产精品久久99热 | 色综合久久久网 | 日韩在线观看一区二区三区 | 色狠狠操 | 狠狠综合久久 | 国产在线观看 | 国产精品一区二区久久国产 | 欧美综合干 | 国产韩国精品一区二区三区 | 国产精品国产三级国产不产一地 | 色多多污污在线观看 | 国产精品一区二区美女视频免费看 | 精品国产99国产精品 | 中文字幕刺激在线 | 国产不卡精品 | 国产精品毛片一区二区 | 一区二区三区四区不卡 | 一本一本久久a久久精品综合 | 天天爽夜夜爽人人爽曰av | 精选久久 | 日韩在线电影 | 九九激情视频 | 99中文字幕在线观看 | 免费av网站在线看 | 精品国产伦一区二区三区免费 | 天天插天天干 | 亚洲一级黄色av | 欧美日韩国产一区二区三区 | 99久久日韩精品视频免费在线观看 | 蜜桃av久久久亚洲精品 | 国产午夜麻豆影院在线观看 | 久久不卡视频 | 久久天天躁狠狠躁夜夜不卡公司 | 伊人五月天婷婷 | 五月婷婷亚洲 | 国产黄色在线观看 | 久久污视频 | 免费观看www7722午夜电影 | 久久免费视频8 | 黄色av影院| 久久歪歪 | 亚洲精品97 | 精品影院一区二区久久久 | 欧美日韩电影在线播放 | 99av国产精品欲麻豆 | 国产一级片一区二区三区 | 视频一区二区在线 | 天天天干夜夜夜操 | 人人舔人人爽 | 99久高清在线观看视频99精品热在线观看视频 | 亚洲视屏在线播放 | 九九日九九操 | 六月婷婷网 | 天天操天天操天天操天天操天天操天天操 | 99九九视频 | 国产精品美女视频网站 | 久久99精品国产91久久来源 | 亚洲电影影音先锋 | 久久精品国产精品亚洲 | 国产精品久久久久高潮 | 国产伦精品一区二区三区四区视频 | 四虎国产永久在线精品 | 一区在线观看视频 | 日躁夜躁狠狠躁2001 | 亚一亚二国产专区 | 色a在线观看 | 国产一级片观看 | 中文字幕免费在线看 | 91亚洲精品国偷拍自产在线观看 | 国产福利在线 | 国产h片在线观看 | 在线影院中文字幕 | 九九热.com | 日韩免费成人av | 亚洲 综合 精品 | 国产一区二区高清不卡 | 欧美激情综合五月色丁香 | 久久久免费高清视频 | 色天天综合久久久久综合片 | 午夜色场| 天天色天天综合网 | 免费看一级黄色大全 | 在线 视频 一区二区 | 99精品视频免费全部在线 | 国产精品18久久久久久久网站 | 色噜噜狠狠狠狠色综合久不 | 婷婷久月 | 精品国产a | 欧美日韩在线免费观看视频 | 日本精a在线观看 | 最新av中文字幕 | 日日日操 | 91成人精品一区在线播放69 | 婷婷久操 | 亚洲欧洲视频 | 午夜视频福利 | 美女在线黄 | 毛片永久新网址首页 | 亚洲国产精品成人精品 | 国产系列在线观看 | 天天干天天草天天爽 | 久久a国产 | 欧美一级免费黄色片 | 色婷婷影视 | 国产在线观看二区 | 欧美亚洲国产一卡 | 成人在线视频在线观看 | 日韩二区精品 | 黄色精品久久 | 欧美aa一级片 | 人人舔人人 | 欧美极度另类性三渗透 | 欧美 日韩 性 | 91大神电影 | 国产一二三四在线观看视频 | 亚洲天天干 | 天天玩天天操天天射 | 射综合网 | 综合网中文字幕 | 国产黄色免费观看 | 免费观看一级特黄欧美大片 | aaaaaa毛片 | 日韩免费不卡视频 | 最新影院 | 欧美性色综合网站 | 久久精品久久久久 | 久久视频在线视频 | 久久久久久久久久免费视频 | 最新色站 | 亚洲,国产成人av | 日韩欧美一区二区不卡 | 99麻豆视频 | 色婷婷免费视频 | 亚洲精品自拍视频在线观看 | 在线观看色网 | 一级成人免费视频 | 中文字幕免费播放 | 国产精品 久久 | 国产视频一区在线播放 | 久久免费视频播放 | 国产精品久久久777 成人手机在线视频 | 日韩精品三区四区 | 碰超在线观看 | 91av电影在线 | 国产.精品.日韩.另类.中文.在线.播放 | 免费看黄网站在线 | 久精品视频 | 欧美日韩在线观看一区二区 | 国产精品激情在线观看 | 午夜精品99久久免费 | 97人人爽 | 中文av不卡 | 国产精品理论片在线观看 | 国产免费成人 | 亚洲伊人av | 成人h电影在线观看 | 欧洲亚洲激情 | 日韩v欧美v日本v亚洲v国产v | 久久免费看av | 欧美成人中文字幕 | 成人欧美亚洲 | 91精品少妇偷拍99 | 91福利影院在线观看 | 国产一二三在线视频 | 日日爽天天操 | 久久成人精品电影 | 久草在线视频免赞 | 亚洲精品乱码久久久久久久久久 | 98精品国产自产在线观看 | 亚洲天堂网视频 | 国产视频一区精品 | 粉嫩一区二区三区粉嫩91 | 国产亚洲精品中文字幕 | 特级a毛片| 日韩高清在线一区二区 | 水蜜桃亚洲一二三四在线 | 波多野结衣视频在线 | 国产精品国产三级国产aⅴ无密码 | 五月婷婷激情综合网 | 久久久夜色 | 久久精品毛片基地 | 久久黄色免费观看 | 日本久久免费视频 | 欧美成人黄色片 | 久久伊人精品一区二区三区 | 成人三级视频 | 中文字幕在线播放日韩 | 深爱激情亚洲 | 天天操天天弄 | 精品视频123区在线观看 | 午夜精品剧场 | 国产视频在线免费观看 | 在线a人v观看视频 | 69精品视频 | 人人澡人人澡人人 | www.狠狠插.com | 国产a精品 | 在线看国产一区 | 亚洲精品玖玖玖av在线看 | 97中文字幕| 激情综合狠狠 | 国产成人一区三区 | 久草在线视频在线观看 | 九九有精品 | 黄免费网站 | h视频日本 | 亚洲激情中文 | 91免费观看 | www在线免费观看 | 成人久久久电影 | 激情五月综合网 |