open-index/open-npm huggingface dataset:
npm package: @skyrpex/remember
Description: Method that retrieves a value from an object given a path
Author: cristian@pallares.io
Latest version: 1.0.1

# Remember

[![TravisCI Build status](https://travis-ci.org/skyrpex/remember.svg?branch=master)](https://travis-ci.org/skyrpex/remember)

Method that retrieves a value from an object given a path. If the path doesn't exist in the object, it assigns the default value from the given callback.

## Installation

`npm install @skyrpex/remember`

## Usage

```js
import remember from '@skyrpex/remember';

const object = {
  a: 'value A',
};

remember(object, 'a', () => 'default A'); // 'value A'
remember(object, 'b', () => 'default B'); // 'default B'
object.b; // 'default B'
```
npm package: @skyrpex/string-codec
Description: Encodes stringifiable objects into a string while retaining the original object type
Author: Cristian Pallarés
Latest version: 1.0.0

# @skyrpex/string-codec

Encodes stringifiable objects into a string while retaining the original object type.

## Installation

```sh
npm install @skyrpex/string-codec
```

## Usage

```ts
import * as stringCodec from "@skyrpex/string-codec";

const encoded = stringCodec.stringify({
	key: "value",
});
// encoded = "{"key":"value"}"

const decoded = jsonCodec.parse(encoded);
// decoded = { key: "value" }
```

## Other codecs

- [json-codec](https://github.com/skyrpex/json-codec)
- [devalue-codec](https://github.com/skyrpex/devalue-codec)
- [superjson-codec](https://github.com/skyrpex/superjson-codec)
npm package: @skyrpex/style-webpack-loaders
Description: Provides helpers for creating style loaders
Author: cristian@pallares.io
Latest version: 2.0.0

# Style Webpack loaders

## Installation

`npm install @skyrpex/style-webpack-loaders`

## Usage

```js
// webpack.config.js
import {
  ExtractTextPlugin,
  loaders,
  vueLoaders,
} from '@skyrpex/style-webpack-loaders';

export default {
  // ...
  module: {
    loaders: {
      ...loaders(/* { sourceMap: true, extract: true } */),
    },
  },
  vue: {
    loaders: {
      ...vueLoaders(/* { sourceMap: true, extract: true } */),
    },
  },
  plugins: [
    // Extract styles to a file
    new ExtractTextPlugin('css/[name].[contenthash].css'),
  ],
};
```
npm package: @skyrpex/tslint-config-base
Description: TSLint Shareable Config for TypeScript
Author: Cristian Pallarés
Latest version: 2.0.0-dev.2

# @skyrpex/tslint-config-base

> TSLint Shareable Config for TypeScript

## Installation

```bash
npm install @skyrpex/tslint-config-base -D
```

## Usage

Add this to your `tslint.json` file:

```json
{
    "extends": ["@skyrpex/tsling-config-base"]
}
```
npm package: @skyrpex/vue-jsx-loader
Description: Webpack loader for Vue.js components with JSX render functions
Author: cristian@pallares.io
Latest version: 0.0.1-1

# Vue JSX Webpack loader

This loader will allow to use JSX render functions along with HMR. Beware, it may have bugs.

## Installation

`npm install @skyrpex/vue-jsx-loader`

## Usage

```js
// path/to/component.jsx
export default {
  render(h) {
    return <div>
      <p>Hello</p>
    </div>;
  },
};
```

```js
// webpack.config.js
export default {
  // ...
  module: {
    loaders: [
      // Place the vue-jsx-loader before the babel-loader
      {
        test: /jsx$/,
        loader: '@skyrpex/vue-jsx',
      },
      {
        test: /jsx?$/,
        loader: 'babel',
      },
    ],
  },
};
```
npm package: @skyscanner/babel-plugin-skyscanner-i18n
Description: A Babel transform plugin to replace strings with their translations.
Author: Paolo Chiabrera
Latest version: 1.2.0

A [Babel](https://babeljs.io) transform plugin to replace strings with their translations.

## Example

**.babelrc**

```json
{
    "plugins": [
        ["skyscanner-i18n", {
            "dictionary": {
                "Hello": "Bonjour",
                "Hello, {name}!": "Bonjour, {name}!"
            }
        }]
    ]
}
```

**In**

```js
const name = 'Brad';
const hello = t('Hello');
const helloWithName = t('Hello, {name}!', {
    name
})
```

**Out**

```js
const name = 'Brad';
const hello = 'Bonjour';
const helloWithName = 'Bonjour, ' + name + '!';
```

## Installation

```bash
npm i -D babel-plugin-skyscanner-i18n
```

## Usage

### Via `.babelrc`

```json
{
    "plugins": [
        ["skyscanner-i18n", {
            "functionName": "t",
            "dictionary": {}
        }]
    ]
}
```

### Via Node API

```js
require('babel-core').transform('code', {
    plugins: [
        ['skyscanner-i18n', {
            functionName: 't',
            dictionary: {}
        }]
    ]
});
```

## Options

There are two options available, both are optional:

### `dictionary`

A mapping of the strings passed to the translation function to their translated versions. If no dictionary is passed, calls to the translation function will be replaced with the original string.

### `functionName`

The name of the function that wraps the strings. Defaults to `t`.

### `leftDelimiter`, `rightDelimiter`

The delimiter to be used for templating. Defaults to `{` `}`.

### `delimiter`

Shorthand for when both `leftDelimiter` and `rightDelimiter` are the same. Example: `@@`
npm package: @skyscanner/backpack-react-scripts
Description: Backpack configuration and scripts for Create React App.
Latest version: 11.2.2

# backpack-react-scripts

### **Important:** The currently supported version of **CRA** by `backpack-react-scripts` is up to `v5+`. Versions above this may not work.

This package is a fork of [Create React App](https://github.com/facebookincubator/create-react-app) (specifically the
`react-scripts` package). It's intended to be used in conjuction with `create-react-app` like so:

```sh
npx create-react-app my-app --scripts-version=@skyscanner/backpack-react-scripts --template @skyscanner/backpack --use-npm

# start your app development like you normally would with `create-react-app`
cd my-app
npm start
```

## What is different in our fork?

- Compilation of uncompiled Backpack components (specifically JSX).
- Skyscanner specific template with Backpack components integrated out of the box. Published as `@skyscanner/cra-template-backpack`
- CSS Modules enabled by default for all `.css` & `.scss` files.
- Ability to create a bundle for server side rending.
- Automatic chunking is disabled by default.
- **`css.html` & `js.html`**: New files in the `build/` output folder. These are html partials that include `<script />` and `<link />` references to the various static assets output by webpack. Useful if automatic chunking is turned on and you don't want to worry about order.
- A bunch of configuration options via `"backpack-react-scripts"` field in `package.json`:
  - `crossOriginLoading`: Modify the default behaviour, see [docs](https://webpack.js.org/configuration/output/#output-crossoriginloading).
  - `babelIncludePrefixes`: An array of module name prefixes to opt into babel compilation. Includes `["@skyscanner/bpk-", "bpk-"]` by default.
  - `enableAutomaticChunking`: Boolean, opt in to automatic chunking of vendor, common and app code.
  - `vendorsChunkRegex`: String, Regex for picking what goes into the `vendors` chunk. See `cacheGroups` in webpack docs. Dependent on `enableAutomaticChunking` being enabled
  - `amdExcludes`: Array of module names to exclude from AMD parsing. Incldues `["lodash"]` by default.
  - `externals`: exposing the Webpack config to modify externals, see [docs](https://webpack.js.org/configuration/externals/).
  - `ssrExternals`: Similar to above, but for `ssr.js` only.
  - `cssModules`: Boolean, true by default.
  - `sriEnabled`: Sets if SRI is to be used during build to add integrity hash for files, see [docs](https://github.com/waysact/webpack-subresource-integrity/blob/master/README.md).
    - **Note** if this is enabled, `crossOriginLoading` value is overriden with `anonymous` in order for it to output with the integrity value.
  - `ignoreCssWarnings`: Boolean, false by default. Allows the ability to supress CSS ordering issues when its safe to allow mixed order when it has not effect on output, see [docs](https://github.com/webpack-contrib/mini-css-extract-plugin#remove-order-warnings). False by default