text:
# Redux Form Manager
A Form control built with and for React with Redux. Initially built for use in Redux Project
> Validatation in form is easy to go...

### If you liked, gimme a star, Thanks.

## Release Issues
### Latest version is `v3.0.0`
* `v3.0.0`
  - Update feature core.getFormError to dispatch firstError of formData to reducer.
  - Update feature export new function { getErrorMessage } from 'redux-form-manager'
  - Update New Demo <https://hlex.github.io/redux-form-manager/demo>
* `v2.16.0`
  - Fixed bugs rules `equalLength`, `maxLength`, `minLength` cannot validate and show message properly.
  - Update rules usage in README.md
* `v2.15.0`
  - Add `lodash` to peerDependencies for features updateNestedFieldData
* `v2.14.0`
  - Add feature - add props `afterUpdateWhenValid` (default = false) (thanks for [KIRAN H](https://github.com/KIRAN-H))
* `v2.13.0`
  - Fixed bugs Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the FormValidation component. (thanks for [KIRAN H](https://github.com/KIRAN-H))
* `v2.12.0`
  - When `errorMessage` is not empty, afterFieldChange won't trigger. (thanks for [KIRAN H](https://github.com/KIRAN-H))
  - `errorMessage` is assigned to '' (empty String) when value is valid. (#issue2 closed thanks for [GA-MO](https://github.com/GA-MO))
* `v2.10.0`
  - Update React to version 15.6.0
  - Using PropTypes from 'prop-types'
* `v2.9.0`
  - Add feature - `props in formData` formData: (state, props) => {}

## Special Thanks to 'GA-MO'
[![alt text][logo]](https://github.com/GA-MO)

[logo]: https://avatars2.githubusercontent.com/u/18608702?v=4&s=400 "GA-MO"

### This Component Repository created by [*React Component Boilerplate*](<https://github.com/GA-MO/react-component-npm-package-boilerplate/>)
React Component boilerplate for creating new React Compoment and everything you need to get started.

I recommend you to use it if you wanna create some awesome component for this world !

## Prerequisite
This project uses library React-Redux-Gamo-boilerplate, React, Redux, React-Redux and ES2015 syntax, so make sure that you are capable with it.
- React-Redux-Gamo-boilerplate https://github.com/GA-MO/react-redux-gamo-boilerplate
- ES2015 https://babeljs.io/learn-es2015/
- React https://facebook.github.io/react/
- Redux http://redux.js.org/
- React-Redux https://github.com/reactjs/react-redux

## Fast date with Demo & Examples
Live demo: <https://hlex.github.io/redux-form-manager/demo>

The live demo is still running redux-form-manager `v3.0.0`

### Welcome to clone or fork and give me some pull request.

you can run this repository in your local machine by this command
```
$ npm run dev
```
it will serve at `localhost:9000`

## Getting Started
```
$ npm install redux-form-manager --save
```
or if you prefer yarn..
```
$ yarn add redux-form-manager
```

## WARNING !
### Basically, we are using loganfsmyth/babel-plugin-transform-decorators-legacy (@ symbol) in any tutorials so make sure that you have added it in your .babelrc
Read more about [loganfsmyth/babel-plugin-transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy)
### if you don't want to, let's using this format to activate instead.

### Stand Alone
```js
export default bindFormValidation(core, afterFieldChange, mapStateToValidationPriority)(YourContainer)
```

### With Connect (React-Redux)
```js
const connectedComponent = connect(mapStateToProps, mapDispatchToProps)(YourContainer)
export default bindFormValidation(core, afterFieldChange, mapStateToValidationPriority)(
  connectedComponent
)
```

## Advanced Usage: Reveal Key Features
There are many features we have provided
- [Rendering User Interface with any React Components.](#feature-custom-ui)
- [Doing things after update function when any fields dispatched.](#feature-after-update)
- [Creating custom validation rules.](#feature-custom-validation)
- [Handling dynamic field properties.](#feature-dynamic-field-props)
- [Customizing action type of each field.](#feature-customize-action)
- [Validating each field by priority.](#feature-validation-priority)
- [Using Nested field data such as array of object.](#feature-nested-field)
- [Dispatch firstError to outside container.](#feature-dispatch-firsterror)
- [Using other event to dispatch.](#feature-other-dispatch)

## Basic Usage: Just copy paste
Create new js file and then copy following codes
```js
import React, { Component } from 'react'
import { bindFormValidation } from 'redux-form-manager'

class TextInputField extends Component {
  handleChange = (e) => {
    const { onChange } = this.props
    onChange(e.target.value)
  }
  render = () => {
    const {
      label,
      value,
      disable,
      placeholder,
      hidden,
      errorMessage,
    } = this.props
    return (
      <div className={`box-form-input ${hidden && 'hidden'}`}>
        <label>{label}</label>
        <input
          type='text',
          value={value}
          disabled={disabled}
          placeholder={placeholder}
          onChange={this.handleChange}
        />
        <div className='error-message'>{errorMessage}</div>
      </div>
    )
  }
}

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <TextInputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core)
export default class Form extends Component {
  render() {
    const { formData, renderInputField, firstError } = this.props
    return (
      <div>
        <h1>Form</h1>
        {renderInputField(formData.firstname)}
        {renderInputField(formData.lastname)}
        <h4>error: {firstError}</h4>
      </div>
    )
  }
}
```
Boom! you got a form with field that could be validated, your page also.
Look at your console that

# Documentation
## Table of Contents
- ### Get Started
  - [Concept](#concept)
  - [Setup](#setup)
  - [Core](#core)
  - [Working Example](#working-example)
- ### Form Data & Field Data Properties
  - [Form Data](#form-data)
  - [Field Data](#field-data)
- ### Features
  - [Rendering User Interface with any React Components.](#feature-switch-ui)
  - [Customizing RenderInputField function.](#feature-custom-ui)
  - [Doing things after update function when any fields dispatched.](#feature-after-update)
  - [Creating custom validation rules.](#feature-custom-validation)
  - [Handling dynamic field properties.](#feature-dynamic-field-props)
  - [Customizing action type of each field.](#feature-customize-action)
  - [Validating each field by priority.](#feature-validation-priority)
  - [Using Nested field data such as array of object.](#feature-nested-field)
  - [Dispatch firstError to outside container.](#feature-dispatch-firsterror)
  - [Using other event to dispatch.](#feature-other-dispatch)

## Concept
Coming soon.

## Setup
install npm packages
```
$ npm install redux-form-manager --save
```
or if you prefer yarn..
```
$ yarn add redux-form-manager --save
```

import library at the start of your js file
```js
import { bindFormValidation } from 'redux-form-manager'
```
### InputField
InputField is a UI component that receive event from user. You can create any JSX UI as you want. You just reminded that binding function props with renderUIInputField updateValue.

```js
import React, { Component } from 'react'
class TextInputField extends Component {
  handleChange = (e) => {
    const { onUpdateValue } = this.props
    onUpdateValue(e.target.value)
  }
  render = () => {
    const {
      label,
      value,
      disable,
      placeholder,
      hidden,
      errorMessage,
    } = this.props
    return (
      <div className={`box-form-input ${hidden && 'hidden'}`}>
        <label>{label}</label>
        <input
          type='text',
          value={value}
          disabled={disabled}
          placeholder={placeholder}
          onChange={this.handleChange}
        />
        <div className='error-message'>{errorMessage}</div>
      </div>
    )
  }
}
```

### Tips for InputField
You can create InputField Component that can morph to other inputs by defining props 'type' such as text, select, checkbox, radio etc.

```js
import React, { Component } from 'react'

import TextInput from 'your/component/path'
import SelectInput from 'your/component/path'

class InputField extends Component {
  render() {
    switch (type) {
      case 'text':
        return <TextInput {...this.props}></TextInput>
      case 'select':
        return <SelectInput {...this.props}></SelectInput>
      default:
        return <TextInput {...this.props}></TextInput>
    }
  }
}

export default InputField

```

### bindFormValidation()
bindFormValidation is a higher order function that return function which grant component to have form manager modules which are 'formData', 'renderInputField()', 'firstError'

## Core
core is an object to assign variables to bindFormValidation()
### all of these keys are required. (Please copy them)

```js
const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}
@bindFormValidation(core)
```
### actionType (defaultActionType in action)
As you know, redux's store has dispatch function which it is a process that fire action to reducer contains actionType and any variables.
defaultActionType is a default actionType of store.dispatch when you didn't send fieldData's actionType (we'll talk about this later).

## Working Example
Create new js file and then copy following codes
```js
import React, { Component } from 'react'
import InputField, { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: [
        required: 'Please fill in your firstname.'
      ],
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: [
        required: 'Please fill in your lastname.'
      ],
    }
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    switch (fieldData.type)
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core)
export default class Form extends Component {
  render() {
    const { formData, renderInputField, firstError } = this.props
    return (
      <div>
        <h1>Form</h1>
        {
          renderInputField(formData.firstname)
        }
        {
          renderInputField(formData.lastname)
        }
        <h4>error: {firstError}</h4>
      </div>
    )
  }
}
```

## Form Data
### The common variable of this package is 'formData'
formData is a metadata of the form which it's type is Object. you can describe properties of your form in this variable. In any formData, it contains many fieldDatas.

### Example
```
const formData = {
  firstname: {
    name: 'firstname',
    type: 'input',
    label: 'Firstname',
    value: '',
    placeholder: 'write down your firstname',
    disabled: false,
    hidden: false,
    rules: [
      required: 'Please fill in your firstname.'
    ],
  },
}
```

## Field Data
### Another variable of this package, 'fieldData'
fieldData is an Object that define properties of the field. For example, firstname field would have properties like this
### Field Data Schema (Recommended)
| Property        |     Type
| ------------- |:-------------:
| name | String (*)
| value | String, Object (*)
| rules | Object (*)
| type      | String
| label    | String
| placeholder | String
| disabled |    Boolean
| hidden | Boolean

(*) is required

### You can add any keys as your Component need.

we can define fieldData as follow.
```js
const firstname = {
  name: 'firstname',
  type: 'input',
  label: 'Firstname',
  value: '',
  placeholder: 'write down your firstname',
  disabled: false,
  hidden: false,
  rules: {
    required: 'Please fill in your firstname.'
  },
},
```

## Switch UI
In ordinary form, we know that there are many input types such as 'text', 'select', 'radio', 'checkbox' etc. In redux-form-manager we also provide you to config your input type.

### just switch (case) in renderUIInputField

```js
import React, { Component } from 'react'
import { bindFormValidation } from 'redux-form-manager'

import TextInput from 'your/component/path'
import SelectInput from 'your/component/path'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'text',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    age: {
      name: 'age',
      type: 'select',
      label: 'Age',
      value: '',
      placeholder: '',
      disabled: false,
      hidden: false,
      options: [
        {
          label: '15 years old',
          value: '15',
        },
        {
          label: '20 years old',
          value: '20',
        }
      ]
      rules: {
        required: 'Please select your age.'
      },
    }
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    switch (fieldData.type) {
      case 'text':
        return <TextInput {...fieldData} onChange={updateValue} />
      case 'select':
        return <SelectInput {...fieldData} onChange={updateValue} />
      default:
        return <InputField {...fieldData} onChange={updateValue} />
    }
  }
}

@bindFormValidation(core)
export default class Form extends Component {
  render() {
    const { formData, renderInputField, firstError } = this.props
    return (
      <div>
        <h1>Form</h1>
        { renderInputField(formData.firstname) }
        { renderInputField(formData.age) }
        <h4>error: {firstError}</h4>
      </div>
    )
  }
}
```

## Custom UI
Building your own custom UI, we are going to use 2nd parameter of renderInputField.

```js
import React, { Component } from 'react'
import { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core)
export default class Form extends Component {

  renderMyInputComponent = (fieldData, updateValue) => {
    return (
      <MyInputComponent
        {...fieldData}
        onUpdateValue={(value) => updateValue(fieldData.key, value)}
      />
    )
  }

  render() {
    const { formData, renderInputField, firstError } = this.props
    return (
      <div>
        <h1>Form</h1>
        { renderInputField(formData.firstname, this.renderMyInputComponent) }
        { renderInputField(formData.lastname) }
        <h4>error: {firstError}</h4>
      </div>
    )
  }
}

class MyInputComponent extends Component {

  handleChange = (e) => {
    const { onUpdateValue } = this.props
    onUpdateValue(e.target.value)
  }

  render() {
    return (
      const {
        label,
        value,
        disable,
        placeholder,
        hidden,
        errorMessage,
      } = this.props
      <div className={`box-form-input ${hidden && 'hidden'}`}>
        <label>{label}</label>
        <input
          type='text',
          value={value}
          disabled={disabled}
          placeholder={placeholder}
          onChange={this.handleChange}
        />
        <div className='error-message'>{errorMessage}</div>
      </div>
    )
  }
}
```

## mapStateToValidationPriority
Validating each field by priority.

```js
import React, { Component } from 'react'
import InputField, { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const mapStateToValidationPriority = state => {
  return ['lastname', 'firstname']
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core, null, mapStateToValidationPriority)
```

## afterFieldChange
Doing after update function when any field dispatch.

```js
import React, { Component } from 'react'
import InputField, { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const mapStateToValidationPriority = state => {
  return []
}

const afterFieldChange = (dispatch, state) => {
  return {
    firstname: (value, key) => {
      dispatch({
        type: 'FORM/CHANGE/CUSTOMER',
        key: 'lastname',
        value: value
      })
    },
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core, afterFieldChange, mapStateToValidationPriority)
```

## actionType
Customizing action type of each field.

```js
import React, { Component } from 'react'
import InputField, { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      actionType: 'MY_ACTION_FIRSTNAME',
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
      },
    },
    lastname: {
      actionType: 'MY_ACTION_LASTNAME',
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const afterFieldChange = (dispatch, state) => {
  return {
    firstname: (value, key) => {
      dispatch({
        type: 'FORM/CHANGE/CUSTOMER',
        key: 'lastname',
        value: value
      })
    },
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core, afterFieldChange)
```

## Custom Validation Rules

### Rules build-in list
```js
rules: {
  'required': `${message}`,
  'require': `${message}`,
  'email': `${message}`,
  'thaiMobile': `${message}`,
  'thaiPhone': `${message}`,
  'thaiId': `${message}`,
  'thaiFullname': `${message}`,
  'equalLength': {
    length: `${length}`,
    message: `${message}`
  },
  'maxLength': {
    maxLength: `${length}`,
    message: `${message}`
  },
  'minLength': {
    minLength: `${length}`,
    message: `${message}`
  },
  'alphabet': `${message}`,
  'number': `${message}`,
  'correctBracket': `${message}`,
  'notStartWithSpacing': `${message}`,
  'notContainDoubleSpacing': `${message}`,
  'notEndWithSpacing': `${message}`,
  'notContainSpecialChar': `${message}`,
}
```

Creating custom validation rules.

```js
import React, { Component } from 'react'
import InputField, { bindFormValidation } from 'redux-form-manager'

const createForm = (state) => {
  return {
    firstname: {
      name: 'firstname',
      type: 'input',
      label: 'Firstname',
      value: '',
      placeholder: 'write down your firstname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your firstname.'
        customValidate: [
          {
            message: 'ชื่อต้องขึ้นต้นด้วยตัวเลข',
            valid: value => {
              return /^\d/.test(value)
            }
          }
        ]
      },
    },
    lastname: {
      name: 'lastname',
      type: 'input',
      label: 'Lastname',
      value: '',
      placeholder: 'write down your lastname',
      disabled: false,
      hidden: false,
      rules: {
        required: 'Please fill in your lastname.'
      },
    }
  }
}

const core = {
  actionType: 'FORM/CHANGE/CUSTOMER',
  formData: (state, props) => createForm(state),
  renderUIInputField: (fieldData, updateValue) => {
    return <InputField {...fieldData} onChange={updateValue} />
  }
}

@bindFormValidation(core)
```

## Nested Field Data
Using Nested field data such as array of object.

## Dynamic Field Data properties
Handling dynamic field properties.

## Dispatch firsterror
Dispatch firstError to outside container.

## Other Dispatchs
Using other event to dispatch.

## Contribution
### just clone and pull request.

#### Please open any issues, I will solve it as fast as possible.
#### Contact me<EMAIL_ADDRESS>Thank you for your support !

repository: hlex/redux-form-manager

repo_name: hlex/redux-form-manager


text:
<!-- @@@title: ImgBot - Incident Response Policy@@@ -->

<div class="container container-plain">

# ImgBot Data Breach Response Policy

![](/images/icon.svg)

This policy is based on the [policy](https://www.sans.org/security-resources/policies/general/pdf/data-breach-response) created by or for the SANS Institute. Feel free to modify or use for your organization. If you have a policy to contribute, please send e-mail to [stephen@sans.edu](mailto:stephen@sans.edu).

## 1.0 Purpose

The purpose of the policy is to establish the goals and the vision for the breach response process. This policy will clearly define to whom it applies and under what circumstances, and it will include the definition of a breach, staff roles and responsibilities, standards and metrics (e.g., to enable prioritization of the incidents), as well as reporting, remediation, and feedback mechanisms. The policy shall be well publicized and made easily available to all personnel whose duties involve data privacy and security protection.

ImgBot Information Security's intentions for publishing a Data Breach Response Policy are to focus significant attention on data security and data security breaches and how ImgBot’s established culture of openness, trust and integrity should respond to such activity. ImgBot Information Security is committed to protecting ImgBot's employees, partners and the company from illegal or damaging actions by individuals, either knowingly or unknowingly.

## 1.1 Background

This policy mandates that any individual who suspects that a theft, breach or exposure of ImgBot Protected data or ImgBot Sensitive data has occurred must immediately provide a description of what occurred via e-mail to [help@imgbot.net](mailto:help@imgbot.net). This e-mail address is monitored by ImgBot’s Information Security Administrator ([@dabutvin](https://github.com/dabutvin)). ImgBot will investigate all reported thefts, data breaches and exposures to confirm if a theft, breach or exposure has occurred. If a theft, breach or exposure has occurred, the Information Security Administrator will follow the appropriate procedure in place.

## 2.0 Scope

This policy applies to all whom collect, access, maintain, distribute, process, protect, store, use, transmit, dispose of, or otherwise handle Personally Identifiable Information (PII) or Protected Health Information (PHI) of ImgBot members. Any agreements with vendors will contain similar protective language.

## 3.0 Policy Confirmed theft, data breach or exposure of ImgBot Protected data or ImgBot Sensitive data

As soon as a theft, data breach, or exposure containing ImgBot Protected data or ImgBot Sensitive data is identified, the process of removing all access to that resource will begin.

The Executive Director ([@dabutvin](https://github.com/dabutvin)) will be notified of the theft, breach, or exposure and will analyze the breach or exposure to determine the root cause. Additionally the Executive Director will decide how to communicate the breach to: a) internal employees, b) the public, and c) those directly affected.

## 3.2 Ownership and Responsibilities

### Roles & Responsibilities:

- Sponsors - Sponsors are those members of the ImgBot community that have primary responsibility for maintaining any particular information resource. Sponsors may be designated by any ImgBot Executive in connection with their administrative responsibilities, or by the actual sponsorship, collection, development, or storage of information.
- Information Security Administrator is that member of the ImgBot community, designated by the Executive Director, who provides administrative support for the implementation, oversight and coordination of security procedures and systems with respect to specific information resources in consultation with the relevant Sponsors.
- Users include virtually all members of the ImgBot community to the extent they have authorized access to information resources, and may include staff, trustees, contractors, consultants, interns, temporary employees and volunteers.

## 4.0 Enforcement

Any ImgBot personnel found in violation of this policy may be subject to disciplinary action, up to and including termination of employment. Any third party partner company found in violation may have their access to ImgBot terminated.

## 5.0 Definitions

- **Encryption or encrypted data** – The most effective way to achieve data security. To read an encrypted file, you must have access to a secret key or password that enables you to decrypt it. Unencrypted data is called plain text;
- **Plain text** – Unencrypted data.
- **Hacker** – A slang term for a computer enthusiast, i.e. a person who enjoys learning programming languages and computer systems and can often be considered an expert on the subject(s).
- **Protected Health Information (PHI)** - Under US law if any information about health status, provision of health care, or payment for health care that is created or collected by a "Covered Entity" (or a Business Associate of a Covered Entity), and can be linked to a specific individual.
- **Personally Identifiable Information (PII)** - Any data that could potentially identify a specific individual. Any information that can be used to distinguish one person from another and can be used for de-anonymizing anonymous data can be considered
- **Protected data** - See PII and PHI
- **Information Resource** - The data and information assets of an organization, department or unit.
- **Safeguards** - Countermeasures, controls put in place to avoid, detect, counteract, or minimize security risks to physical property, information, computer systems, or other assets. Safeguards help to reduce the risk of damage or loss by stopping, deterring, or slowing down an attack against an asset.
- **Sensitive data** - Data that is encrypted or in plain text and contains PII or PHI data. See PII and PHI above.

## 6.0 Revision History

### Version 1.0

- June 23, 2018
- Author: @dabutvin
- Initial version

</div>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# Skuba Tools pkg

Why is this needed?

We need this pkg tools for making working cmd-line vendored pkgs, such `ginkgo`.
In order to make the vendoring work for the cmd, we import those pkgs here, since they are not used in the code anyhow.

repository: danielorf/skuba

repo_name: danielorf/skuba


text:
# Simple login for Node.js

## Use of this example code

For the login endpoint the request is of POST type:

```
http://{URL}/login
```

You need to pass in the body the keys:
```
username: example_username
password: example_password
```

And it returns:
```
{
    "token": example_token
}
```

For the secure endpoint the request is of GET type:

```
http://{URL}/api/secure
```

You need to pass a header:
```
Authorization: example_token
```

And it returns:
```
"If you are reading this you reached a secure endpoint"
```

#### Note

This project is based on the Wolox Express.js Bootstrap using Sequelize as ORM.

## License

**login_node** is available under the MIT [license](LICENSE.md).

    Copyright (c) 2019 Wolox

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

     IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.

repository: Wolox/frontend-cookbook

gha_language: TypeScript

repo_name: Wolox/frontend-cookbook


text:
# city-country-timezone

[![NPM](https://nodei.co/npm/city-country-timezone.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/city-country-timezone/)

Find timezone of any country, city or province

## About

By passing a country, province or city you would get an object with the timezone of that location you indicated and then the difference in hours between that location you indicated and the location where the code is running (know as `time_diff`). The location used to test this code is `Odessa, Ukraine` which would determine the outcome of the `time_diff`

## Getting Started

### Installation

`npm install city-country-timezone`

### Code snippet

#### Search by city

```javascript
const getTimeDiffAndTimeZone = require('city-country-timezone');

const country = "Los Angeles"; //city

const { timezone, time_diff } = getTimeDiffAndTimeZone(country);

console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: America/Santiago, Time Difference: -5
```

#### Search by region and country

```javascript
const getTimeDiffAndTimeZone = require('city-country-timezone');

const country = "Samara Region, Russian Federation"; //region and country

const { timezone, time_diff } = getTimeDiffAndTimeZone(country);

console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: Europe/Moscow, Time Difference: +1
```

#### Search by city and country

```javascript
const getTimeDiffAndTimeZone = require('city-country-timezone');

const country = "Lagos, Nigeria"; //city and country

const { timezone, time_diff } = getTimeDiffAndTimeZone(country);

console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: Africa/Lagos, Time Difference: -1
```

repository: rotimi-best/city-country-timezone

gha_language: JavaScript

repo_name: rotimi-best/city-country-timezone