@a-la/fixture-alamode

1.1.3 • Public • Published

@a-la/fixture-alamode

npm version

@a-la/fixture-alamode is source code compiled with ÀLaMode.

yarn add -E @a-la/fixture-alamode

Table Of Contents

API

The package is available by importing its default and named functions:

import erte, { c, b } from '@a-la/fixture-alamode'

erte(): string

Returns erte.

/* yarn example/ */
import fixtureAlamode from '@a-la/fixture-alamode'

(async () => {
  const res = await fixtureAlamode({
    text: 'example',
  })
  console.log(res)
})()
erte

c(): string

Returns c.

b(): string

Returns b.

Transpiled Source Code

This is how ÀLaMode transpiles the source code:

const Stream = require('stream'); const {
  Transform,
} = Stream;
const { join } = require('path');

class S extends Transform {
  /**
   * Creates a new instance.
   * @param {string} path
   * @param {Stream} [parent]
   */
  constructor(path, parent) {
    super()
    this.source = join('example', path)
    if (parent instanceof Stream)
      this.pipe(parent)
  }
}

/**
 * A function that returns `c`.
 * @param {string} input
 */
const c = (input = '') => {
  return 'c' + input ? `-${input}` : ''
}

/**
 * A function that returns `b`.
 * @param {number} times
 */
const b = (times = 0) => {
  return 'b' + times ? `-${times}` : ''
}

module.exports = S
module.exports.c = c
module.exports.b = b

Copyright

Art Deco © Art Deco for À La Mode 2019 Tech Nation Visa Tech Nation Visa Sucks

Readme

Keywords

Package Sidebar

Install

npm i @a-la/fixture-alamode

Weekly Downloads

12

Version

1.1.3

License

MIT

Unpacked Size

8.25 kB

Total Files

11

Last publish

Collaborators

  • zvr