open-index/open-npm huggingface dataset:
npm package: @hspkg/boom
Description: A toolkit for CDN deployment.
Author: Cody Chan
Latest version: 1.0.2

# boom

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]
[![JavaScript Style Guide][standard-image]][standard-url]


A toolkit for CDN deployment.

## Background

There're lots of ways to deploy a backend application, but not for frontend applications.

IMO, we can make things easier by CI:

 - Git push to repository with special **marks**
 - Trigger CI to build and publish to CDN

Here **marks** can be a branch or tag which can also be used to separate different environments. And here we make an assumption:

 - A branch like `daily/x.y.z`: publish to daily environment
 - A tag like `publish/x.y.z`: publish to production environment

The tool is a gadget to do these things better for you. If you have different **marks**, fork & modify as you like.

## Usage

In the root directory of project:

```bash
$ npx @hspkg/boom
```

Or

```bash
$ npm i -g @hspkg/boom
$ boom
```

<p align="center">
<img src="https://cdn.int64ago.org/l3j47tlp.svg" width="600" alt="screenshot">
</p>

## License

MIT © [Cody Chan](https://int64ago.org/)


[npm-image]: https://img.shields.io/npm/v/@hspkg/boom.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@hspkg/boom
[downloads-image]: https://img.shields.io/npm/dt/@hspkg/boom.svg?style=flat-square
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://standardjs.com
npm package: @hspkg/chain
Description: Partial implementation for Optional Chaining in ES5
Author: Cody Chan
Latest version: 1.0.1

# chain

[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![Travis][travis-image]][travis-url]
[![Coverage][coverage-image]][coverage-url]

[npm-image]: https://img.shields.io/npm/v/@hspkg/chain.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@hspkg/chain
[download-image]: https://img.shields.io/npm/dm/@hspkg/chain.svg?style=flat-square
[download-url]: https://npmjs.org/package/@hspkg/chain
[travis-image]: https://img.shields.io/travis/int64ago/chain.svg?style=flat-square
[travis-url]: https://travis-ci.org/int64ago/chain
[coverage-image]: https://img.shields.io/coveralls/int64ago/chain.svg?style=flat-square
[coverage-url]: https://coveralls.io/github/int64ago/chain

Partial implementation for [Optional Chaining](https://github.com/tc39/proposal-optional-chaining) in ES5

## API

```js
var chain: (sourceObject: object, propertyString: string, defaultValue: any) => any
```

## Examples

`npm i @hspkg/chain -S`

```js
var chain = require('@hspkg/chain');

var testObj = {
  code: 200,
  data: {
    list: [
      { id: 1, name: 'name1' },
      { id: 2, name: 'name2' }
    ],
    page: {
      current: 1,
      total: 200
    }
  }
};

console.log(chain(testObj, '.code')); // 200
console.log(chain(testObj, '.data.page.current')); // 1
console.log(chain(testObj, '.data.list[0].id')); // 1
console.log(chain(testObj, '.wrong.path')); // undefined
console.log(chain(testObj, '.wrong.path', 666)); // 666
```

## License

MIT
npm package: @hspkg/generator-rc
Description: React component generator
Author: Cody Chan
Latest version: 1.0.2

# generator-rc
[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url]
> React component generator

## Usage

```bash
npm install -g yo
npm install -g @hspkg/generator-rc
```

Then in your project folder:

```bash
yo @hspkg/rc
```

## License

MIT © [Cody Chan](https://int64ago.org/)

[npm-image]: https://img.shields.io/npm/v/@hspkg/generator-rc.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@hspkg/generator-rc
[daviddm-image]: https://img.shields.io/david/int64ago/generator-rc.svg?style=flat-square
[daviddm-url]: https://david-dm.org/int64ago/generator-rc
npm package: @hspkg/mutate
Description: Modify object and return immutable object.
Author: Cody Chan
Latest version: 1.0.3

# mutate

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]  [![Downloads][downloads-image]][npm-url]

Modify object and return immutable object.


## Usage

```bash
npm i @hspkg/mutate -S
```

### API

```js
/**
 * Modify object and return immutable object
 * @param {object} params The source object
 * @param {any} value The value to be set
 * @param {string[]} keys The keys in chain
 * @returns {object}
 */
mutate(params, value, ...keys);
```

### Examples

```js
import mutate from '@hspkg/mutate';

const source = {
  key1: 123,
  key3: 'test3',
  key4: {
    key5: {
      key6: 'Hello',
      key7: 'World'
    }
  }
};

console.log(mutate(source, 'hack', 'key4', 'key5', 'key6'));
// {
//   "key1": 123,
//   "key3": "test3",
//   "key4": {
//     "key5": {
//       "key6": "hack",
//       "key7": "World"
//     }
//   }
// }

console.log(mutate(source, 'hack', 'key4', 'key5', 'key8'));
// {
//   "key1": 123,
//   "key3": "test3",
//   "key4": {
//     "key5": {
//       "key6": "Hello",
//       "key7": "World",
//       "key8": "hack"
//     }
//   }
// }
```


## Test

```bash
npm test
```

## License

[![License][license-image]][license-url]

[downloads-image]: https://img.shields.io/npm/dt/@hspkg/mutate.svg?style=flat-square

[npm-url]: https://npmjs.org/package/@hspkg/mutate
[npm-image]: https://img.shields.io/npm/v/@hspkg/mutate.svg?style=flat-square

[travis-url]: https://travis-ci.org/int64ago/mutate
[travis-image]: https://img.shields.io/travis/int64ago/mutate.svg?style=flat-square

[license-url]: https://github.com/int64ago/mutate/blob/master/LICENSE
[license-image]: https://img.shields.io/github/license/int64ago/mutate.svg?style=flat-square
npm package: @hspkg/update-notifier
Description: update-notifier with custom scope registry
Author: Cody Chan
Latest version: 1.1.1

# update-notifier

[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][npm-url]

[update-notifier][update-notifier] with custom scope registry

## Usage

No new concept, use [update-notifier][update-notifier] under the hood.

```bash
npm i @hspkg/update-notifier -S
```

```javascript
const chalk = require('chalk')
const updateNotifier = require('@hspkg/update-notifier')
const pkg = require('./package.json')

const notifier = updateNotifier({
  // optional, default is package scope
  scope: '@ali',
  // optional, default is https://registry.npmjs.org
  registry: 'https://registry.npm.taobao.org',
})({ pkg })

// optional, the same as update-notifier
notifier.update && notifier.notify({
  message: `发现新版本 ${chalk.gray(notifier.update.current)} -> ${chalk.green(notifier.update.latest)}
  运行 ${chalk.cyan('cnpm i -g ') + notifier.packageName} 更新`
})

// Put your code here
```

![](https://cdn.int64ago.org/bza98mea.png)

## Tips

The tool writes custom registry into `$HOME/.config/npm` whose priority is lower than `$HOME/.npmrc`, so users can override the custom registry in `$HOME/.npmrc`.

## License

MIT © [Cody Chan](https://int64ago.org/)

[npm-image]: https://img.shields.io/npm/v/@hspkg/update-notifier.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@hspkg/update-notifier
[downloads-image]: https://img.shields.io/npm/dt/moky.svg?style=flat-square

[update-notifier]: https://github.com/yeoman/update-notifier