Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
leonardojs
Advanced tools
Dependencies
Installing via npm
or bower
will bring in the above dependencies as well.
npm
$ npm install leonardojs
bower
$ bower install leonardo
Angular (tested with v1.3)
<!DOCTYPE HTML>
<html>
<body ng-app="app">
//.....
<script src="[bower_componenets|node_modules|other]/angular/angular.js"></script>
//.....
<script src="[bower_componenets|node_modules|other]/leonardo/dist/leonardo.js"></script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<body ng-app="app">
//.....
<script>
var myApp = angular.module("app", ["leonardo"]);
//.....
</script>
</body>
</html>
//.....
myApp.run(["leoConfiguration", function(leoConfiguration){
leoConfiguration.addStates([
{
name: 'Get Data',
url: '/api/user/43435',
options: [
{name: 'success', status: 200, data: { name: "Master Splinter" }},
{name: 'error 500', status: 500},
{name: 'error 401', status: 401}
]
},
{
name: 'Update Data',
url: '/api/user/43435',
verb: 'PUT',
options: [
{name: 'success', status: 200},
{name: 'error 500', status: 500},
{name: 'error 400', status: 400}
]
}
]);
}]);
Activates state option, mocked response will be returned when calling the state url
//.....
leoConfiguration.activateStateOption('Update Data', 'success');
$http.put('/api/user/43435', { name: "Master Splinter" }).success(function(data, status) {
console.log(status); // 200
});
leoConfiguration.activateStateOption('Update Data', 'error 500');
$http.put('/api/user/43435', { name: "Master Splinter" }).error(function(data, status) {
console.log(status); // 500
});
//.....
Deactivates a specific state, when calling the state url request will pass through to the server
//.....
leoConfiguration.deactivateState('Update Data');
//.....
You can hide Leonardo activator icon by clicking ctrl
+ shift
+ l
.
cd
into the project folder
npm install
gulp build
gulp serve
This will run the demo app (and auto-refresh the browser)
Copyright © 2015 MIT License
FAQs
Leonardo - Your mocking ninja - an add-on tool for centralizing your client side mocking
The npm package leonardojs receives a total of 102 weekly downloads. As such, leonardojs popularity was classified as not popular.
We found that leonardojs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.