open-index/open-npm huggingface dataset:
npm package: @ln1778/react-native-os
Description: node's os module for react-native
Author: Andy Prock
Latest version: 1.0.2

# os in React Native

node's [os](https://nodejs.org/api/os.html) API in React Native

This module is used by [Peel](http://www.peel.com/)

## Install

* Create a new react-native project. [Check react-native getting started](http://facebook.github.io/react-native/docs/getting-started.html#content)

* In your project dir:

```
npm install react-native-os --save
```

__Note for iOS:__ If your react-native version < 0.40 install with this tag instead:
```
npm install react-native-os@1.0.3 --save
```

## Link in the native dependency

```
react-native link react-native-os
```

***Step 3 Profit***

## Usage

### package.json

_only if you want to write require('os') in your javascript_

```json
{
  "react-native": {
    "os": "@ln1778/react-native-os"
  }
}
```

## Contributors

[Andy Prock](https://github.com/aprock)  

PR's welcome!
npm package: @ln1778/react-native-tcp
Description: node's net API for react-native
Author: Andy Prock
Latest version: 1.0.3

# TCP in React Native

node's [net](https://nodejs.org/api/net.html) API in React Native

This module is used by [Peel](http://www.peel.com/)

## Install

* Create a new react-native project. [Check react-native getting started](http://facebook.github.io/react-native/docs/getting-started.html#content)

* In your project dir:

```
npm install react-native-tcp --save
```

__Note for iOS:__ If your react-native version < 0.40 install with this tag instead:
```
npm install react-native-tcp@3.1.0 --save
```

## Link in the native dependency

```
react-native link react-native-tcp
```

## Additional dependencies

### Due to limitations in the react-native packager, streams need to be hacked in with [rn-nodeify](https://www.npmjs.com/package/rn-nodeify)

1. install rn-nodeify as a dev-dependency
``` npm install --save-dev rn-nodeify ```
2. run rn-nodeify manually
``` rn-nodeify --install stream,process,util --hack ```
3. optionally you can add this as a postinstall script
``` "postinstall": "rn-nodeify --install stream,process,util --hack" ```

## Usage

### package.json

_only if you want to write require('net') in your javascript_

```json
{
  "browser": {
    "net": "react-native-tcp"
  }
}
```

### JS

_see/run [index.ios.js/index.android.js](examples/rctsockets) for a complete example, but basically it's just like net_

```js
var net = require('net');
// OR, if not shimming via package.json "browser" field:
// var net = require('react-native-tcp')

var server = net.createServer(function(socket) {
  socket.write('excellent!');
}).listen(12345);

var client = net.createConnection(12345);

client.on('error', function(error) {
  console.log(error)
});

client.on('data', function(data) {
  console.log('message was received', data)
});
```

### TODO

add select tests from node's tests for net

PR's welcome!



_originally forked from [react-native-udp](https://github.com/tradle/react-native-udp)_
npm package: @ln613/ipath
Description: Ensure immutability by updating javascript objects using a path similar to CSS/jQuery selector, great for react/redux applications where immutability is required, especially when working with deeply nested objects.
Author: Nan Li
Latest version: 0.2.2

# ipath

[![Build Status](https://travis-ci.org/ln613/ipath.svg?branch=master)](https://travis-ci.org/ln613/ipath)

Ensure immutability by updating javascript objects using a path similar to CSS/jQuery selector, great for react/redux applications where immutability is required, especially when working with deeply nested objects.

[documetation](https://ln613.gitbooks.io/ipath/)

## Install

`npm i -S ipath`

## Usage

```js
import { update } from 'ipath';

const obj = {
  artists: [
    {
      id: 3,
      name: 'A1',
      albums: [
        { id: 1, name: 'a1', year: 1990 },
        { id: 2, name: 'a2', year: 1995 },
      ]
    }
  ]
};

let newObj = update(obj, 'artists[id=3].albums[name=a2].year', 1992);
// obj doesn't change, newObj.artists[0].albums[1].year = 1992

let newAlbum = { id: 3, name: 'a3', year: 2000 }
newObj = update(obj, 'artists[0].albums[]', newAlbum);
// add newAlbum to the albums list

newObj = update(obj, 'artists[id=3].albums[name=a2]', null);
// delete an item from array

newObj = update({ a: { b: 1 } }, 'a.b', x => x + 1);
// calculate the new value based on the existing value
```
npm package: @ln613/state
Description: A react/redux library which automates all redux flows including http calls, and store immutability is guaranteed. Redux becomes invisible to you, hence the name no-redux.
Author: Nan Li
Latest version: 1.2.0

# no-redux

[![Build Status](https://travis-ci.org/ln613/no-redux.svg?branch=master)](https://travis-ci.org/ln613/no-redux)

A react/redux library which automates all redux flows including http calls, and store immutability is guaranteed. Redux becomes invisible to you, hence the name no-redux.

|   | redux | no-redux |
|---|---|---|
| define action type | manual | manual |
| generate action creator | manual | auto |
| call action creator in components | ‎manual | manual |
| handle action in middleware (thunk/saga...) | ‎manual | auto |
| send http request | ‎manual | auto |
| receive http response | ‎manual | auto |
| handle action in reducer | manual | auto |
| ensure store immutability | ‎manual | auto |

[slides and demo](https://ln613.github.io/no-redux)

[todo example](https://ln613.github.io/no-redux-todo-example)

[documetation](https://ln613.gitbooks.io/no-redux/)
## Install

`npm i -S no-redux`

## Usage

**Step 1**

Define an action data object, and call "generateActions" to generate action creators.

```js
import { generateActions } from 'no-redux';

export const actionData = {
  artists: {
    url: 'http://localhost/api/artists'
  }
}

export default generateActions(actionData);
```

**Step 2**

Create a redux store by calling the "createStore" function from "no-redux" with the action data object you defined in step 1. The "createStore" function will generate reducers and middlewares that handle http calls and register them with the store.

```js
import React from 'react';
import { render } from 'react-dom';
import { Provider, createStore } from 'no-redux';
import { actionData } from './actions';
import App from './App';

render(
  <Provider store={createStore(actionData)}>
    <App />  
  </Provider>,
  document.getElementById('root')
);
```

**Step 3**

In your component, connect to the store with the action creators you created in step 1. When you call the action creator functions, no-redux will make http requests, get the http response and put the results on the redux store.

```js
import React from 'react';
import { connect } from 'no-redux';
import actions from './actions';

class App extends React.Component {
  componentWillMount() {
    this.props.getArtists();
  }

  render() {
    return (
      <div>
        {(this.props.artists || []).map(a => 
          <div>{a.name}</div>
        )}
      </div>
    );
  }
}

export default connect(s => ({ artists: s.artists }), actions)(App);
```