Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Chilean RUT utils for Node.js, the browser and AngularJS.
bower install --save fi-rut
Include the distributable versions into your scripts bundle or load them as scripts in your HTML.
The library will be assigned as rut
into the window
so you can access its methods directly via window.rut
.
IMPORTANT: Values will allways be converted to lower case to enforce consistency.
For production use the non-minified version:
<script src="/bower_components/fi-rut/dist/fi-rut.js"></script>
For production use the minified version:
<script src="/bower_components/fi-rut/dist/fi-rut.min.js"></script>
var input = document.querySelector('input#rut');
var calculated = rut.calculate(input.value);
var verififer = rut.verifier(input.value);
var isValid = rut.validate(input.value);
var formatted = rut.format(input.value);
var digits = rut.digits(input.value);
var clean = rut.clean(input.value);
Read the library docs for the library's methods specification.
bower install --save fi-rut
Include the distributable versions into your scripts bundle or load them as scripts in your HTML.
This version includes both the browser and AngularJS modules.
The library will be assigned as rut
into the window
so you can access its methods directly via window.rut
.
For development or easy debugging use the non-minified version:
<script src="/bower_components/fi-rut/dist/fi-rut-ng.js"></script>
For production use the minified version:
<script src="/bower_components/fi-rut/dist/fi-rut-ng.min.js"></script>
Include the ngRut
dependency into your app:
angular.module('MyApp', [
// ...
'ngRut'
// ...
]);
The ng-rut
directive must be used only in an <input>
element and will add real-time format and validation to the associated ngModel
:
<input ng-model="data.rut" ng-rut>
Use the ngRut
service to access the module's methods programatically:
function MyController($scope, ngRut) {
var calculated = ngRut.calculate($scope.data.rut);
var verififer = ngRut.verifier($scope.data.rut);
var isValid = ngRut.validate($scope.data.rut);
var formatted = ngRut.format($scope.data.rut);
var digits = ngRut.digits($scope.data.rut);
var clean = ngRut.clean($scope.data.rut);
}
angular.module('MyApp').controller('MyController', ['$scope', 'ngRut', MyController]);
Use the ngRut
filter to interpolate template strings:
<p>{{ data.rut | ngRut }}</p>
<p>{{ data.rut | ngRut : 'calculate' }}</p>
<p>{{ data.rut | ngRut : 'validate' }}</p>
<p>{{ data.rut | ngRut : 'verifier' }}</p>
<p>{{ data.rut | ngRut : 'digits' }}</p>
<p>{{ data.rut | ngRut : 'clean' }}</p>
The module, filter, directive and service are called ngRut
(not fi-rut
) to maintain compatibility with the deprecated ngRut module.
Read the library docs for the library's methods specification.
Read the AngularJS docs for usage and specification on the module, service, directive and filter.
npm install --save fi-rut
Just require fi-rut
.
const rut = require('fi-rut');
const rut = require('fi-rut');
var value = '22222222';
var calculated = rut.calculate(value);
var verififer = rut.verifier(value);
var isValid = rut.validate(value);
var formatted = rut.format(value);
var digits = rut.digits(value);
var clean = rut.clean(value);
Read the library docs for the methods specification.
FAQs
Chilean RUT utils for Node.js and AngularJS
The npm package fi-rut receives a total of 12 weekly downloads. As such, fi-rut popularity was classified as not popular.
We found that fi-rut demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.