Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
frint-compat
Advanced tools
Backwards compatibility package for Frint
Everything that you see here has been deprecated and should not be intentionally used.
With npm:
$ npm install --save frint-compat
Via unpkg CDN:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.0.1/Rx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.8/react-dom.min.js"></script>
<script src="https://unpkg.com/frint@latest/dist/frint.min.js"></script>
<script src="https://unpkg.com/frint-model@latest/dist/frint-model.min.js"></script>
<script src="https://unpkg.com/frint-react@latest/dist/frint-react.min.js"></script>
<script src="https://unpkg.com/frint-store@latest/dist/frint-store.min.js"></script>
<script src="https://unpkg.com/frint-compat@latest/dist/frint-compat.min.js"></script>
<script>
// available as `window.Frint` (now backwards compatible)
</script>
Load it after you have loaded all other packages:
require('frint-compat');
Doing so would mutate other packages to keep them backwards compatible.
createComponent(options)
Creates a new Component, using React internally.
options
(Object
):
render
(Function
[required]): Function returning JSX.beforeMount
(Function
): Called before mounting the Component.afterMount
(Function
): Called after mounting the Component.beforeUnmount
(Function
): Called right before unmounting the Component.Component
: React Component.
h(type, props, children)
The hyperscript wrapping React's React.createElement
. This function is expected to be in the scope wherever JSX is used.
PropTypes
For typechecking Component's props.
createService(options)
options
(Object
): Methods for your class.
options.initialize
(Function
): Treated as class constructor.Function
: ES6-compatible class.
createFactory(options)
options
(Object
): Methods for your class.
options.initialize
(Function
): Treated as class constructor.Function
: ES6-compatible class.
createApp(options)
options
(Object
):
options.component
(Function
): The root Component of your App.options.services
(Object
): Key/value pairs of Service classes.options.factories
(Object
): Key/value pairs of Factory classes.options.models
(Object
): Key/value pairs of Model classes.options.modelAttributes
(Object
): Key/value pairs of Model attributes.options.store
(Object
): The Store instance.options.reducer
(Function
): Root reducer for your Store.options.initialState
(Object
): Initial state for your Store.beforeMount
(Function
): Called before mounting the App.afterMount
(Function
): Called after mounting the App.beforeUnmount
(Function
): Called right before unmounting the App.App
: App class.
new App()
App instance methods:
app.getRootApp()
Extends the native getRootApp()
, and looks for window.app
first, and then returns it if exists.
App
: The root app's instance.
app.getState$()
Observable
: State of your App's store.
app.dispatch(action)
action
(Object
|Function
): Action payload to dispatch to your App's store.void
app.render()
Function
: The root component.
app.getStore()
Store
: The app's store instance.
app.getService(name)
name
(String
): The name of the Service.Object
: The service instance.
app.getFactory(name)
name
(String
): The name of the Factory.Object
: The factory instance.
app.getModel(name)
name
(String
): The name of the Model.Object
: The model instance.
app.setRegion(name)
name
(String
): The name of the region.void
.
app.setRegions(names)
names
(Array
): Array of region names.void
.
app.getWidgets(regionName = null)
regionName
(String
[optional]): Optionally filter apps by their region.Array
: of app instances.
app.readStateFrom(names)
names
(Array
): Array of other App names that you wish to read state from.void
.
mapToProps(options)(Component)
Maps data coming from various sources into Component's props.
options
(Object
):
options.state
(Function
): Accepts state
(Object
) as argument, and returns object to map as props.options.dispatch
(Object
): Dispatchable action creators, keyed by prop namesapp
(Function
): Accepts app
(App
) as argument, and returns object to map as props.shared
(Function
): Accepts shared
(Object
) state as argument, and returns object to map as props.services
(Object
): Object keyed by prop names, and service names as values.factories
(Object
): Object keyed by prop names, and factory names as values.models
(Object
): Object keyed by prop names, and model names as values.observe
(Function
): Accepts app
(App
) as an argument, and returns an Observable
emitting object to be mapped as props.Function
: That can be alled with the target Component.
new Store()
store.subscribe(fn)
fn
(Function
): Listener function, that accepts the latest state as argument.Function
: Call the returned function to unsubscribe from the listener.
v1.4.2 (2017-06-19)
frint-store
frint-react
frint-preset-travix
alex
. (@fahad19)frint-cli
, and getting rid of Makefile in examples. (@fahad19)FAQs
Backwards compatibility package for Frint
The npm package frint-compat receives a total of 3 weekly downloads. As such, frint-compat popularity was classified as not popular.
We found that frint-compat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.