/ never-odd-or-even / back / node_modules / snapdragon / node_modules / define-property /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[   ]package.json2 years ago1.9K 
[   ]index.js10 years ago753  
[TXT]README.md10 years ago2.4K 
[   ]LICENSE10 years ago1.1K 
README.md

define-property NPM version

Define a non-enumerable property on an object.

Install

Install with npm

$ npm i define-property --save

Usage

Params

var define = require('define-property');
var obj = {};
define(obj, 'foo', function(val) {
  return val.toUpperCase();
});

console.log(obj);
//=> {}

console.log(obj.foo('bar'));
//=> 'BAR'

get/set

define(obj, 'foo', {
  get: function() {},
  set: function() {}
});

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 31, 2015.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80