- 浏览: 2614569 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (1286)
- js-oop (2)
- js-window (10)
- js-event (19)
- js-string (37)
- js-array (27)
- js-page (4)
- js-dom (62)
- js-lang (8)
- js-number (7)
- js-platform (3)
- js-object (15)
- js-element (3)
- js-browser (7)
- js-url (6)
- js-date (10)
- css基础 (48)
- css优化 (15)
- html基础 (17)
- html标签 (19)
- js基础 (117)
- js-兼容性差异 (33)
- js引擎 (3)
- js性能 (14)
- json (6)
- jQuery源码浅析 (43)
- web mobile开发资料 (78)
- js跨域 (2)
- html5 (74)
- html5-canvas (7)
- css3 (53)
- 浏览器 (5)
- api设计学 (3)
- js-加载 (3)
- linux (37)
- 架构师 (1)
- php (2)
- self开发的脚本库--凤凰 (2)
- web应用名词 (6)
- javascript新特性翻译 (8)
- ajax (6)
- jQuery动画效果 (7)
- prototype的解读 (13)
- 优秀插件翻译 (1)
- css解决方案 (26)
- 数据库 (2)
- english daily (59)
- 浏览器内核探究 (1)
- jQuery插件介绍 (9)
- jquery基础篇 (26)
- chrome浏览器问题整理 (14)
- js选择器那些事 (3)
- 前端框架 (26)
- Firefox私有属性 (11)
- webkit私有属性集合 (17)
- 书籍推荐 (21)
- 数据结构 (1)
- 网站建设相关 (7)
- 好文翻译 (2)
- 个人作品 (3)
- kissy的解读 (4)
- css-layout(布局研究) (5)
- less研究 (1)
- YUI探究 (1)
- hash探究 (1)
- js动画 (7)
- 前端面试题 (37)
- css书写规范 (1)
- js模板引擎 (6)
- js模块化 (19)
- 编写高质量代码 (3)
- 性能探究--应用协议 (2)
- 前端图像处理 (19)
- Mac OS相关 (21)
- 正则表达式 (11)
- 离线应用相关 (0)
- 前端工具 (65)
- nodeJS (55)
- jquery优化篇 (2)
- 设计模式探究系列 (3)
- windows7 (2)
- IE10 (10)
- 微博开放平台探究 (2)
- 常用web服务接口 (1)
- 数据存储相关 (8)
- 零时文件 (2)
- jQuery Mobile (16)
- backbone (15)
- underscore (22)
- sass (11)
- android (3)
- phonegap (10)
- IE私有 (11)
- qwrap (8)
- git (14)
- chrome extensions (5)
- freemarker (11)
- angularJS (3)
- seo (2)
- markdown (3)
- css动画 (4)
- 安卓开发 (2)
- React (7)
- 活动页技术 (1)
- 网络安全 (3)
- grunt (7)
- Lo-Dash (3)
- 前端国际化 (4)
- 版本控制 (2)
- 盒模型 (4)
- 微信开发 (1)
- Mock数据工具 (1)
- sails (1)
- vim (1)
- js-color (1)
- iOS 基础 (43)
最新评论
-
jertom:
<div id="showInfo" ...
addEventListener等事件监听的参数细谈 -
乌托邦国王:
引用[u][/u]
css3动画属性系列之transform细讲移动translate -
hvang1988:
能提供附件下载吗,找不到js库,google封了访问不了
Syntaxhighlighter---代码高亮插件介绍 -
sscsacdsadcsd:
我的天 那到底是为什么function是object我看und ...
typeof func ==='function'的疑惑 -
wkjiangwk:
试了,没用,你们从不去测试。
介绍一下x-webkit-speech -------实现语音输入
有的时候,我们需要操作Object中的key和value,我们需要获取对应的所有keys或者values
先看看prototype的api设计吧:
/* 获取keys */ keys:function(obj){ var keys = []; for(var pro in obj){ keys.push(pro); } return keys; } /* 获取values */ values:function(obj){ var values = []; for(var pro in obj){ values.push(obj[pro]); } return values; }
1、获取Object对应的keys
/* *keys-get a array contains all the keys in object* *@function* *@param {Object} source* *@return {Array}* *@mark we have not check the source is or not object* */ ZYC.object.keys = function(source){ var result=[], key, _length=0; for(key in source){ if(source.hasOwnProperty(key)){ result[_length++] = key; } } return result; };
2、获取Object对应的values
/* *values-get a array contains all the values in object* *@function* *@param {Object} source* *@return {Array}* *@mark we have not check the source is or not object* */ ZYC.object.values = function(source){ var result=[],key,_length=0; for(key in source){ if(source.hasOwnProperty(key)){ result[_length++] = source[key]; } } return result; };
发表评论
-
underscore的Object之defaults
2014-04-12 18:04 1335_.defaults _.d ... -
underscore的Object之pick
2014-04-12 18:06 2680pick: //返回一个object副 ... -
ES5之Object.seal
2013-08-08 11:05 1567Object.seal 来自ES5 ... -
es6系列之Set
2013-08-05 11:10 0Set 存储任意类型的唯一 ... -
es6系列之Map
2013-08-02 21:58 0本文整理关于Map的一些方法: ... -
ES6系列之Object系列
2013-07-30 13:27 0本文收录一些es6的Object相关的新的方法 ... -
qwrap-object的mix
2013-04-25 15:52 1288qwrap的一个比较常用的api:mix ... -
qwrap-object的isPlainObject
2013-04-23 10:29 0本文载入一个qwrap版本的isPlainObj ... -
qwrap-object的dump
2013-04-25 16:26 1500本文载入qwrap一个dump的 ... -
underscore之size
2013-02-28 17:29 1533size _.size(l ... -
underscore的Objects之keys和values
2013-02-28 16:30 2586keys _.keys(objec ... -
underscore的Objects之has
2013-02-28 15:43 1620/* @name has @par ... -
isObject判断
2013-02-25 11:38 1532本代码片段来自underscore i ... -
字符串times化
2012-11-30 17:44 1395问题:把一个指定的字符串按照指定的个数进行复制输出! ... -
prototype的解读之String的几个检索api
2012-04-06 17:26 1704本篇简单地列举了prototype的几个String下检索的a ... -
prototype的解读之String的capitalize
2012-04-05 21:32 1360从这个api的命名我们很直观地就应该知道是首字母大写的操作。 ... -
prototype的解读之String的camelize
2012-04-05 21:24 2693其实这个api的作用和我前面写的 目标字符串驼峰化 功能上是一 ... -
关于浏览器的判断整理
2012-03-21 11:42 1692这篇主要是整理一下ua下的判定。 关于docume ... -
prototype的解读之Object.clone
2012-03-13 14:19 1505Object.clone(obj) -->Object ... -
prototype的解读之Array
2012-03-12 12:41 1612整理部分prototype的Array相关的api 1 ...
相关推荐
const object = { /** * key-value mapping * values can be primitives or objects */} ;const options = { /** * include array indices in FormData keys * defaults to false */ indices : false , /**
Reference map that allows keys and/or values to be garbage collected under close control Many comparator implementations Many iterator implementations Adapter classes from array and enumerations to ...
value any JavaScript value, usually an object or array. replacer an optional parameter that determines how object values are stringified for objects. It can be a function or an array of strings. ...
or clising of droped down list of filtered values (STFilter). Location: TSTFilterLocationEh - defines the location STFilter. Under the title (stflUnderTitleFilterEh) or in the title ...
Static keys generator for accessing tables, entries and values (instead of strings) Demo scenes included PlayMaker support FlowReactor support Powered by FullSerializer and OdinSerializer ...
Since dictionaries are inherently unordered, sorting them requires extracting the keys or values into an array and then sorting that array. This process does not affect the original dictionary. #####...
- **Null Keys and Values**: `Hashtable` does not allow null keys or values, while `HashMap` allows one null key and multiple null values. - **Performance**: `HashMap` generally offers better ...
集合了 所有的 Unix命令大全 登陆服务器时输入 公帐号 openlab-open123 telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss 老师测评网址 http://172.16.0.198:8080/poll/ 各个 ...
LookupCache: Boolean - Determines whether the values of a lookup field are cached or looked up dynamically every time the current record in the dataset changes. LookupDataSet: TDataSet - Identifies ...
Key range locks are similar to row locks on index keys (whether clustered or not). The locks are placed on individual keys rather than at the node level. The hash value consists of all the key ...
Explanation of using the `With` statement to group statements that operate on the same object, thus making the code more efficient. **Use “vbNullString” (Page 17)** Instructions on using `...
New Code Analysis and Refactoring Functions - smart object, column, and parameter renaming methods; smart code extraction methods; advanced code dependencies analysis Graphical analysis of ...
However, if we are searching for multiple rows, such as duplicate values, or keys in a range, anything more than a small number of rows will make the nonclustered index search very inefficient. ...
Sorting Keys or Indices Basedon the Corresponding Values Recipe 5.5. Sorting Strings with Embedded Numbers Recipe 5.6. Processing All of a List's Items in Random Order Recipe 5.7. Keeping a ...
This feature simplifies the process of generating unique values, such as primary keys, during runtime. It eliminates the need for additional procedures or functions to fetch sequence values, ...
Enables users to create or edit a shading object, which has a smooth transition between colors across an area. Foxit PDF Editor offers linear and radial gradients for users to choose. 2. Converting ...
- **Additional**: You can pass multiple keys to retrieve multiple model instances at once. **`put(model_instance)`** - **Function**: Saves a model instance to the Datastore. - **Parameters**: - `...
They are used for mapping keys to values and are highly efficient for data retrieval. **Booleans and Comparing Values** Booleans represent logical values: True and False. Comparison operators (==, !...
Unquoted keys: {name: "world"} Default value is Disabled. Assertions JSONxx uses internally JSONXX_ASSERT(...) macro that works both in debug and release mode. Set jsonxx::Settings::Assertions ...