
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.
can-view-import
Advanced tools
Import dependencies in Stache views.
can-view-import function
<can-import from="MODULE_NAME" />
Statically import a module from with a [can-stache] template. MODULE_NAME will be imported before the template renders.
<can-import from="components/tabs" />
<tabs-widget />
{moduleName}
:
A module that this template depends on.<can-import from="MODULE_NAME">content</can-import>
Dynamically import a module. MODULE_NAME will be imported dynamically; the scope within the template is a Promise.
<can-import from="components/tabs">
{{#if isResolved}}
<tabs-widget />
{{/if}}
</can-import>
{moduleName}
:
A module that this template depends on.from="MODULE_NAME"
Passes MODULE_NAME to [can-util/js/import/import] and sets the 's viewModel to be the returned Promise.
<can-import from="bootstrap/bootstrap.css" />
{String}
:
The name of the module to import.can-tag="TAG_NAME"
Instantiates the provided [can-view-callbacks.tag] and sets its [can-component::viewModel viewModel] to be the Promise for the import.
{String}
:
The tag name (usually a [can-component]) to use.{^value}="*NAME"
Sets up a [can-stache-bindings.toParent] binding to *NAME in the references scope.
{String}
:
The variable name to assign to the references scope. This can be any string name you want to use, but must be preceded by *
or it will be placed on the template's View Model.<can-import from="app/person" {^value}="*person" />
<section>
hello {{*person.name}}
</section>
To make a build of the distributables into dist/
in the cloned repository run
npm install
node build
Tests can run in the browser by opening a webserver and visiting the test.html
page.
Automated tests that run the tests from the command line in Firefox can be run with
npm test
FAQs
Import dependencies in CanJS views
We found that can-view-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.