Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

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

Unpacked Size

5.09 kB

Total Files

13

Last publish

Collaborators

  • avatar