
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy 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.4.0/Rx.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.min.js"></script>
<script src="https://unpkg.com/prop-types@15.5.10/prop-types.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.
FAQs
Backwards compatibility package for Frint
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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.