open-index/open-npm huggingface dataset:
npm package: @financial-times/math
Description: A temporary helper library to avoid newer dart-sass versions printing warnings when compiling Origami.
Latest version: 1.1.1

# math

A temporary helper library to avoid newer dart-sass versions printing warnings when compiling Origami.

- [Usage](#usage)
- [Licence](#licence)

## Usage

To use this library, import it via `@import '@financial-times/math';`.

After importing the library, you will have access to all the functions defined in [mathsass@0.10.1](https://github.com/terkel/mathsass/tree/v0.10.1) and the below function as well as:

- [div](#div) - Returns the result of dividing the first number by the second number.

### div

Returns the result of dividing the first number by the second number.

This behaves in the same way as the deprecated `/` operator in sass.

```scss
@import '@financial-times/math';

@debug div(10, 2); // 5
```

## Licence

This software is published by the Financial Times under the [MIT licence](http://opensource.org/licenses/MIT).
npm package: @financial-times/n-automation
Description: Run automated [regression tests](https://en.wikipedia.org/wiki/Regression_testing) for your app using [nightwatch.js](http://nightwatchjs.org/) and get results on Slack and email.
Latest version: 2.4.0

# n-automation [![Circle CI](https://circleci.com/gh/Financial-Times/n-automation.svg?style=svg)](https://circleci.com/gh/Financial-Times/n-automation)

Run automated [regression tests](https://en.wikipedia.org/wiki/Regression_testing) for your app using [nightwatch.js](http://nightwatchjs.org/) and get results on Slack and email.

<img src="doc/makefile.png" height="260"> <img src="doc/slacknotif.png" height="260">

## Installation

`npm install @financial-times/n-automation`

## Usage

### Makefile
Write a `regression` recipe on your Makefile containing the tests you'd like to run, passing the `n-automation` reporter to `nht nightwatch`:

```Makefile
REPORTER = ./node_modules/@financial-times/n-automation/build/reporter.js

regression:
	nht nightwatch -c nightwatch.js path/to/test.js --reporter ${REPORTER}
	nht nightwatch -c nightwatch.js path/to/anotherTest.js --reporter ${REPORTER}
	...
```

### Init

Init `n-automation` in an independent file somewhere in your project, for example `jobs/run-regression.js`:

```js
const Automation = require('@financial-times/n-automation');

Automation.run({
	appName: 'Your App Name',
	nightwatchJson: require('../nightwatch.js')
});
```
Only pass in `nightwatchJson` if your project has a nightwatch config. If not, send only `appName` and `n-automation` will default to the `n-heroku-tools` [nightwatch config file](https://github.com/Financial-Times/n-heroku-tools/blob/master/config/nightwatch.json)

### Env Variables

- `process.env.SLACK_URL` Slack [Incoming Webhook Integration URL](https://financialtimes.slack.com/apps/new/A0F7XDUAZ-incoming-webhooks) for the channel to notify
- `process.env.SLACK_MENTIONS` Slack users to mention on failure (optional)
- `process.env.REGRESSION_RECIPIENTS` email addresses of the people to notify on test failure

### Heroku Schedule

Schedule your job with something like the [Heroku Scheduler](https://elements.heroku.com/addons/scheduler). Once a day is recommended.

### Email on failure

Full nightwatch output will be sent to the email addresses above whenever a test fails.

### Examples

See [next-signup](https://github.com/Financial-Times/next-signup)
npm package: @financial-times/n-card
Description: Holds Next FT’s card components
Latest version: 8.0.3
Deprecated: This package is no longer supported

# n-card

Inline documentation for required and optional properties is in each component's js file, these follow the [JSDoc `@param` format](http://usejsdoc.org/tags-param.html)

Demos for configurations are found [here](http://financial-times.github.io/n-card/) with source code in [`./demos` directory](./demos). The property objects are generally built in [n-section](https://github.com/Financial-Times/n-section) and passed through.

The Video cards don't have demos but it will create a card with the right data attributes for oVideo to pick up when it gets instantiated on the page.

## Using without n-section

This repo can now be used without requiring n section or using the JSON layout config.  Simply use the `Card` component and this will do the work to deciding which underlying card type to use.

**If you are using `n-section` don't use the `Card` component, it won't work.**
npm package: @financial-times/n-concept
Description: n-concept provides a card for concepts (e.g. topic, author) and their articles
Latest version: 8.1.1

# n-concept

n-concept is a card that shows a list of articles for a concept (topic, author, etc.) with links to myFT actions

## Install

Add the component to bower.json and package.json

Run `npm install n-concept --save && bower install n-concept --save`

Add the following line to your main sass file: `@import "n-concept/main";`

## Usage

Server-side
```html
	{{> n-concept/templates/concept }}
```

Client-side
```javascript
const myftTemplate = require('../../../views/partials/myft.html');
const myFtHtml = myftTemplate(data);
```

n-concept requires at least the following data:
* `url` - url for the concept stream page
* `name` - name of the concept e.g. World
* `conceptId`
* `items` an array of objects that are the headlines to show
* `imageUrl` for the image that appears at the top. You don't have to use the presenter to do this, but you will probably want to

Please view the source for more information.

## Extra data

n-concept comes with 3 decorators

`concept` combines the 2 decorators below

`responsive-grids` handles scenarios where you want particular cards to be hidden at certain breakpoints. For example, on the home page only 3 myFT concept cards are shown between the medium and large breakpoints.  This decorator requires the data item `show` with the settings in an object e.g. `{ default: true, M: false, XL: true }`

`concept-image` retrieves the image for the concept card. It requires the list of articles in an array of objects called `items`, which should be in your data anyway.

The decorator finds an image from the list of articles to be displayed, and if it cannot find one uses a default.

##Demo page
`$ make demo`: Serves examples of the component locally (`http://localhost:5005`), using dummy data and in isolation from an app.

This is done on a simple express app which renders a single demo page that calls the partials to exhibit, populating them with data from a fixture.

##Pa11y
`$ make a11y`: Serves page of demo components, on which it runs [Pa11y](http://pa11y.org/) accessibility tests (errors flagging up accessibility infringements), which will also be run as part of the Continuous Integration (CI) process.
npm package: @financial-times/n-content-decorator
Description: Decorates FT content prior to rendering
Latest version: 1.0.5
Deprecated: This package is no longer supported

[![Coverage Status](https://coveralls.io/repos/github/Financial-Times/n-content-decorator/badge.svg?branch=master)](https://coveralls.io/github/Financial-Times/n-content-decorator?branch=master)

#n-content-decorator

Provides decoration for content sourced either directly from the next Elastic Search cluster, or via the next-graphql-api, for compatibility for rendering content cards.

##Options supported;

###Decoration type

`mutateOriginal: true` will mutate the object passed to it.

`mutateOriginal: false` will return the decoration object, which can be merged in with the original object by the calling application (eg. `Object.assign(original, decoration)``).

`false` is the default option and need not be passed in.

###Excluded Taxonomies

`excludeTaxonomies: true` prevents specific taxonomies (organisations, regions, people) from appearing in the tag that is returned.

`excludeTaxonomies: false` leaves taxonomies unaffected.

`false` is the default and need not be passed in.

###Minor Branding

Determines how brand (if content is associated with a brand) is displayed.

`minorBranding: true` brand appears below standfirst and primary Tag is shown eg. as on stream list.

`minorBranding: false` brand replaces primary Tag at the top of the card.

`false` is the default option and need not be passed in.

(NOTE: the intention is to migrate this display option to n-card rather than handle it here)

##Example usage

###With an array of content items

####With `mutateOriginal: false`

```
const decoration = require('ft-n-content-decoration');

contentArray.map(content => Object.assign(content, decoration(content, {options})));

```

####With `mutateOriginal: true`

```
const decorateContent = require('ft-n-content-decoration');

contentArray.map(content => decorateContent(content, {options}));

```
npm package: @financial-times/n-control-centre-subnav
Description: shared subnav logic middleware between next-control-centre and newspaper-control-centre
Author: Zhenyu Lin
Latest version: 0.2.0

# n-control-centre-subnav [![npm version](https://badge.fury.io/js/%40financial-times%2Fn-control-centre-subnav.svg)](https://badge.fury.io/js/%40financial-times%2Fn-control-centre-subnav) [![CircleCI](https://circleci.com/gh/Financial-Times/n-control-centre-subnav.svg?style=shield)](https://circleci.com/gh/Financial-Times/workflows/n-control-centre-subnav) [![Coverage Status](https://coveralls.io/repos/github/Financial-Times/n-control-centre-subnav/badge.svg?branch=master)](https://coveralls.io/github/Financial-Times/n-control-centre-subnav?branch=master) [![Dependencies](https://david-dm.org/Financial-Times/n-control-centre-subnav.svg)](https://david-dm.org/Financial-Times/n-control-centre-subnav) [![Known Vulnerabilities](https://snyk.io/test/github/Financial-Times/n-control-centre-subnav/badge.svg)](https://snyk.io/test/github/Financial-Times/n-control-centre-subnav)

shared subnav logic middleware between next-control-centre and newspaper-control-centre
npm package: @financial-times/n-counter-ad-blocking
Description: Next counter ad-blocking component
Latest version: 4.0.0-beta.1

# n-counter-ad-blocking
Component to report users blocking ads to Spoor

## How to use;
Incorporated into n-ui/ads, so if that is being used in your app, you already have it.

## Feature Flag Control

`sourcepoint`: controls the initiating of the adBlock check. Without this on, no adBlock check takes place, so no actions would be taken.
npm package: @financial-times/n-desktop-app-banner
Description: A banner to show new users to make them aware of the native mobile apps.
Latest version: 5.0.2

n-invite-colleagues [![Circle CI](https://circleci.com/gh/Financial-Times/n-desktop-app-banner/tree/master.svg?style=svg)](https://circleci.com/gh/Financial-Times/n-desktop-app-banner/tree/master)
=================

Bower component/Node module for the 'share with colleages' strip used on some B2B pages.

![image](https://user-images.githubusercontent.com/17846996/30050965-35265124-9218-11e7-9dc7-5ac889cd2734.png)

----

## Usage

**Important** This assumes you are using n-ui in your application. We use the `encode` handlebars helper pulled in by n-handlerbars: https://github.com/Financial-Times/n-handlebars#encode

### Template

```
{{> n-invite-colleagues/templates/index shortName=[xxx] longName=[xxx] }}
```
where `shortName` is the acquisition context company name to use in the copy link

and `longName` is the full name of the company for use in copy (e.g. in email title when sharing the link). This name will be uri encoded where relevant. If no longName is provided then sensible default copy will be used.

### CSS

```
@import 'n-invite-colleagues/main';
```

### JS

```
import inviteColleagues from '../../main';

inviteColleagues.init();
```

## Demo

To run the demo, run `make init` followd by `make demo`. You should now be able to access this at <http://local.ft.com:5005>
npm package: @financial-times/n-email-article
Description: Sharing paywalled articles with others through email
Latest version: 5.1.1

# FT Next's Email Article

A component to share paywalled articles with others through email, whether they are FT subscribers or not.

This is the client-side UI.

## Demos

[financial-times.github.io/n-email-article](http://financial-times.github.io/n-email-article)

CircleCI doesn't push latest to GitHub Pages.  You will need to do it manually using your GitHub credentials:

```sh
sh gh-pages.sh
```

## Installation

```sh
git clone git@github.com:financial-times/n-email-article
cd n-email-article
make install
```

## Development

To start a development web server with hot reloading capability:

```sh
make run
```

then open in the web browser:

[https://local.ft.com:5050/webpack-dev-server/](https://local.ft.com:5050)

## Usage

See [demos](./demos) and search for `n-email-article` in [next-article](https://github.com/financial-times/next-article) for actual uses in production.
npm package: @financial-times/n-flow-ft-content
Description: Flow type definition for a piece of FT content, as represented in Elastic Search. Automatically generated on publish from the ES mappings.
Author: matthew.brennan@ft.com
Latest version: 1.0.2

# n-flow-ft-content

Flow type definition for a piece of FT content, as represented in Elastic Search. Automatically generated on publish from the ES mappings.

## Usage

`npm install @financial-times/n-flow-ft-content`, then in a Flow-activated repo you can `import type {FtItem} from '@financial-times/n-flow-ft-content'`.

## Using Flow in your project

Add `flow-bin` as a dependency of your project. Create an empty [`.flowconfig`](https://flow.org/en/docs/config/) file at the root of your project (e.g. by running `flow init`).

If you don't want to introduce a build step for your code, use the [Flow comment syntax](https://flow.org/en/docs/types/comments/). Otherwise, install either `babel-preset-flow` or `flow-remove-types` and add it to your build process.

Run `flow check` as part of your CI tests, and maybe in a `precommit` hook. Encourage your developers to add a Flow integration to their editor.

### Atom

Install [`atom-ide-ui`](https://atom.io/packages/atom-ide-ui) and [`ide-flowtype`](https://atom.io/packages/ide-flowtype). Alternatively, you could install the whole of [Nuclide](https://nuclide.io/).

### VS Code

Install [Flow Language Support](https://marketplace.visualstudio.com/items?itemName=flowtype.flow-for-vscode) or [vscode-flow-ide](https://marketplace.visualstudio.com/items?itemName=gcazaciuc.vscode-flow-ide).

### Sublime Text

Install [FlowIDE](https://packagecontrol.io/packages/FlowIDE), and optionally [SublimeLinter-flow](https://packagecontrol.io/packages/SublimeLinter-flow) and the [Babel](https://packagecontrol.io/packages/Babel) syntax highlighting.

### Other editors

https://flow.org/en/docs/editors/

## Licence

MIT