Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

syamu-proxy

0.0.0 • Public • Published

Syamu Proxy

npm CircleCI donate

Install

yarn add syamu-proxy

Usage

const syamuProxy = require('syamu-proxy');
 
const proxied = syamuProxy({
  num: 28,
  get num2() {
    return this.num;
  },
  str: 'a',
  get str2() {
    return this.str;
  },
  arr: ['foo', 'bar'],
  obj: {
    foo: 'foo',
    bar: 'bar'
  },
  void: undefined
});
 
console.log(proxied.num); // 0
console.log(proxied.num2); // 0
console.log(proxied.str); // ''
console.log(proxied.str2); // ''
console.log(proxied.arr); // []
console.log(proxied.obj); // {}
console.log(proxied.null) // null
console.log(proxied.undefined) // undefined

install

npm i syamu-proxy

Downloadsweekly downloads

0

version

0.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability