Wondering what’s next for npm?Check out our public roadmap! »

    babel-plugin-transform-for-in

    1.0.3 • Public • Published

    Start

      // .babelrc
      {
        "plugins":["babel-plugin-transform-for-in"]
      }

    Example

    • in
    for (var id in this.infoDict) {
      var info = this.infoDict[id]
    
      if (info.kind !== kind) {
        continue
      }
    
      var _s = info.pathArr.join('.')
    
      if (_s.indexOf(s) === 0) {
        if (!includingEqual && _s === s) {
          continue
        }
    
        res.push(info)
        continue
      }
    • out
    for (var id in this.infoDict) {
      if (Object.hasOwnProperty.call(this.infoDict, id)) {
        var info = this.infoDict[id]
    
        if (info.kind !== kind) {
          continue
        } // 检查是否以 dataPath 开头
    
    
        var _s = info.pathArr.join('.')
    
        if (_s.indexOf(s) === 0) {
          if (!includingEqual && _s === s) {
            continue
          }
    
          res.push(info)
          continue
        }
      }
    }

    Install

    npm i babel-plugin-transform-for-in

    DownloadsWeekly Downloads

    7

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.32 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar