open-index/open-npm huggingface dataset:
npm package: @mattilsynet/designsystem
Description: Design system for Mattilsynet
Author: Mattilsynet
Latest version: 0.22.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Design system for Mattilsynet

[![npm version](https://badge.fury.io/js/@mattilsynet%2Fdesignsystem.svg)](https://badge.fury.io/js/@mattilsynet%2Fdesignsystem)

## Opening in storybook

When you have cloned this repo to your computer, you can run the following commands, to view the project in 
[StorybookJS](https://storybook.js.org/).

```bash
npm install
npm run storybook
// also run in other terminal to build sass
npm run start
```

## Installation and usage

Install the design system from npm into your project, you can run the following command:

```bash
npm i --save @mattilsynet/designsystem
```

## Building and deploy to npm

You can run the following command to build the scss into css files, and deploy package to npm:

```bash
npm run build
npm publish
```
npm package: @mattilsynet/designsystem-css
Description: ## Installation and usage
Author: Mattilsynet
Latest version: 0.2.85
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# CSS for Mattilsynet Design system

## Installation and usage

Install the css design system from npm into your project, you can run the following command:

```bash
npm i --save @mattilsynet/designsystem-css
```

## Building and deploy to npm

You can run the following command to build the scss into css files, and deploy package to npm:

```bash
npm run build
npm publish
```
npm package: @mattilsynet/designsystem-svelte
Description: Design system for Mattilsynet
Author: Mattilsynet
Latest version: 0.8.20
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Svelte

# Run Storybook locally
`npm run storybook`

# Run test
`npm run test`

# Build package
`npm run build`
npm package: @mattinsler/es6require
Description: Require 'export default' or 'module.exports'
Author: Matt Insler
Latest version: 0.0.3

# @mattinsler/es6require

In cases where you need to use `require` and you don't know if the module is
using `export default` or `module.exports`.

## Installation

```bash
$ npm install --save @mattinsler/es6require
```

## Usage

```javascript
import es6require from '@mattinsler/es6require';

const otheModule = es6require('module-name');
```
npm package: @mattinsler/format-jsonc
Description: Consistent formatting for JSONC files
Latest version: 0.0.4

# @mattinsler/format-jsonc

Consistent formatting for JSONC files

## Example

```typescript
import { format, parseFileSync } from '@mattinsler/format-jsonc';

// read a json file and parse it
const ast = parseFileSync('./tsconfig.json');
// format back to JSONC
format(ast);

// sort all objects and then format to JSONC
format(ast, [sortObjects()]);

// only sort the array named "sort-me"
format(ast, [sortArrays((path) => isObjectPropertyNamed('sort-me'))]);
```

## API

Parsing

- **parse(text: string): ASTObject**
- **parseFile(filename: string): Promise<ASTObject>**
- **parseFileSync(filename: string): ASTObject**

Formatting

- **format(ast: ASTArray | ASTObject): string**
- **format(ast: ASTArray | ASTObject, transforms: Transform[]): string**

Transforming

- **sortArrays(): Transform**
- **sortArrays(predicate: Predicate<ASTArray>): Transform**
- **sortObjects(): Transform**
- **sortObjects(predicate: Predicate<ASTObject>): Transform**
npm package: @mattinsler/garnish
Description: A useful group of decorators
Author: Matt Insler
Latest version: 0.0.6

# @mattinsler/garnish

A useful group of decorators

## Installation

```bash
$ npm install --save @mattinsler/garnish
```

## Usage

#### @concurrent(max-concurrent-executions)

Only allow a certain number of concurrent calls to a method. If the method
returns a promise, only `max-concurrent-executions` executions of that method
can be running at the same time. If the method is called more times
concurrently, an Error will be thrown.

```javascript
import { concurrent } from '@mattinsler/garnish'

class Foo {
  @concurrent(1)
  async update() {
    // do something that takes long
  }
}
```

#### @memoize

Ensure that a method is only called once per class instance. The return
value is saved and returned for all future calls. In order to not allow for
accidental RAM abuse, this will only work for methods that do not take any
parameters.

```javascript
import { memoize } from '@mattinsler/garnish'

class Foo {
  @memoize
  getConnection() {
    // establish connection and return a promise
  }

  async update() {
    const connection = await this.getConnection();
    // use connection
  }
}
```

#### @omit(...fields)

Remove fields from the return object. This will work for return values that
are plain objects or promises that return plain objects. This will also work
for single return values or arrays.

```javascript
import { omit } from '@mattinsler/garnish'

class User {
  @omit('_id', 'password')
  find(query) {
    return UserModel.find(query);
  }

  @omit('_id', 'password')
  findOne(query) {
    return UserModel.findOne(query);
  }
}
```

#### @view(viewConfigObject)

Mutates fields in the return object according to the viewConfigObject. This will
work for return values that are plain objects or promises that return plain objects.

There are 4 types of operations that you can use with the `@view` decorator.

- **Copy**: `{ 'to-key': 'from-key' }`
- **Rename**: `{ 'to-key': '!from-key' }`
- **Delete**: `{ key: 0 }` or `{ key: false }`
- **Compute**: `{ key: (object) => object.foo.bar * 3 }`

You can use any combination of operations in a single declaration. You can also
specify nested objects using `.` as a delimiter in either the key or value.

```javascript
import { view } from '@mattinsler/garnish'

class User {
  @view({
    id: '!_id',      // rename _id to id
    password: false  // delete password
    name: (user) => `${user.firstName} ${user.lastName}`, // compute name
    'accounts.github': 'github'  // copy { github } to { accounts: { github }}
  })
  findOne(query) {
    return UserModel.findOne(query);
  }
}
```