How to use the tableschema.Table function in tableschema

To help you get started, we’ve selected a few tableschema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frictionlessdata / datapackage-js / src / resource.js View on Github external
options.format = descriptor.format || 'csv'
      options.encoding = descriptor.encoding
      const dialect = descriptor.dialect
      if (dialect) {
        if (dialect.header === false || config.DEFAULT_DIALECT.header === false) {
          const fields = (descriptor.schema || {}).fields || []
          options.headers = fields.length ? fields.map(field => field.name) : null
        }
        helpers.validateDialect(dialect)
        for (const key of DIALECT_KEYS) {
          if (dialect[key]) options[key.toLowerCase()] = dialect[key]
        }
      }
      const schemaDescriptor = this._currentDescriptor.schema
      const schema = schemaDescriptor ? new Schema(schemaDescriptor) : null
      this._table = new Table(this.source, {schema, ...options})

    }
    return this._table
  }

tableschema

A library for working with Table Schema in Javascript.

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis