New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

method-enumerable-decorator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

method-enumerable-decorator

Allow enumeration of ES6 class methods.

0.1.2
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

method-enumerable-decorator

Allow enumeration of ES6 class methods.

Setup

$ npm i method-enumerable-decorator --save
$ npm i babel babel-core babel-plugin-transform-decorators-legacy babel-preset-es2015 --dev

.babelrc

{
  "presets": [
    "es2015"
  ],
  "plugins": [
    "transform-decorators-legacy"
  ]
}

Usage

class Hoge {
  huga() {}
}

const hoge = new Hoge()
Object.keys(hoge)
// => []

import MethodEnumerable from 'method-enumerable-decorator'

@MethodEnumerable
class Huga {
  hoge() {}
}

const huga = new Huga()
Object.keys(huga)
// => ['huga', 'hoge']

Test

$ npm test

Lisence

MIT

FAQs

Package last updated on 07 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts