Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Object utilities
JavaScript Makefile
tree: 78e2708e98

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

object

Object keys / values / length.

Example

var is = require('is');
is.date(obj);

API

.keys(obj)

should return the keys of an object.

var obj = { name: 'tobi', age: 1 };
object.keys(obj).should.eql(['name', 'age']);

.values(obj)

should return the values of an object.

var obj = { name: 'tobi', age: 1 };
object.values(obj).should.eql(['tobi', 1]);

.length(obj)

should return key count.

var obj = { name: 'tobi', age: 1 };
object.length(obj).should.equal(2);

License

MIT

Something went wrong with that request. Please try again.