@mintlab/kitchen-sink
Mintlab utility functions.
Last updated a month ago by zaaksysteem .
EUPL-1.1 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mintlab/kitchen-sink 
SYNC missed versions from official npm registry.

@mintlab/kitchen-sink npm version

Everything but: miscellaneous Mintlab utility functions.

Installation

$ npm install @mintlab/kitchen-sink

Usage

Examples

Public API entry point:

const kitchenSink = require('@mintlab/kitchen-sink');

Destructuring:

const { dictionary } = require('@mintlab/kitchen-sink');

Single module:

const dictionary = require('@mintlab/kitchen-sink/dictionary');

Development

Docker

Start an interactive ash shell for development:

$ docker-compose exec sink sh

If you edit .*rc files in ./root, you must manually copy them to your current working directory in the container.

The package*.json files are symlinked because they can be mutated both on the host and in the container.

Publication

The package is published with semantic-release-gitlab on every merge to the master branch. Mind your commit messages.

Files in ./source are copied to the root and removed after publication. See the prepublishOnly and postpublish lifecycle scripts in package.json.

Manual emergency publication

In edge cases when semantic release cannot increment:

  • if you are not in the container, copy root/.npmrc and root/package.json to the working copy root
  • update the version field in package.json
  • run npm login if needed
  • run npm publish --access public
  • create a matching version tag in gitlab
  • do not commit your changes

Infrastructure

The modules in this package export Node.js modules and work natively on the server. There is no transpilation and distribution build included, to consume them in the browser use your bundler of choice.

See also

Unit testing

Unit tests use tape, a TAP producing test harness for node.

Async

No special libraries or plugins are needed for async tests:

  1. make the test callback async
  2. plan the number of assertions
  3. await the async value
  4. proceed as with any other test
Example
test('The async answer', async assert => {
  assert.plan(1);

  const answer = await new Promise(resolve => {
    setTimeout(() => resolve(42), 1000);
  });

  assert.equal(answer, 42, 'is always 42');
  assert.end();
});

License

Copyright 2017 Mintlab B.V.

Licensed under the EUPL, Version 1.1 or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence").

You may not use this work except in compliance with the Licence.

You may obtain a copy of the Licence at: https://joinup.ec.europa.eu/software/page/eupl

Current Tags

  • 3.8.0                                ...           latest (a month ago)

31 Versions

  • 3.8.0                                ...           a month ago
  • 3.7.1                                ...           2 months ago
  • 3.7.0                                ...           5 months ago
  • 3.6.2                                ...           5 months ago
  • 3.6.1                                ...           5 months ago
  • 3.6.0                                ...           7 months ago
  • 3.5.1                                ...           9 months ago
  • 3.5.0                                ...           9 months ago
  • 3.4.0                                ...           10 months ago
  • 3.3.2                                ...           10 months ago
  • 3.3.1                                ...           10 months ago
  • 3.3.0                                ...           10 months ago
  • 3.2.0                                ...           10 months ago
  • 3.1.2                                ...           a year ago
  • 3.1.1                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.5.0                                ...           a year ago
  • 2.4.1                                ...           a year ago
  • 2.4.0                                ...           a year ago
  • 2.3.0                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.2                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 16
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |