$ cnpm install @putout/plugin-apply-starts-with
The
startsWith()method determines whether a string begins with the characters of a specified string, returningtrueorfalseas appropriate.(c) MDN
????Putout plugin adds ability to apply .startsWith().
Checkout in ????Putout Editor.
npm i @putout/plugin-apply-starts-with
{
"rules": {
"apply-starts-with": "on"
}
}
function x(a = '') {
if (!a.indexOf('1'))
return false;
}
function x1({a = ''}) {
return !a.indexOf('1');
}
function x2() {
const {a = ''} = z;
return !a.indexOf('1');
}
function x(a = '') {
return a.startsWith('1');
}
function x1({a = ''}) {
return a.startsWith('1');
}
function x2() {
const {a = ''} = z;
return a.startsWith('1');
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |